# קישור לפורום בטוויטר ללא תמונה (הסר תגיות מטא)

**URL:** https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521
**Category:** Support
**Created:** [27 בנובמבר,‏ 2020,‏ 8:15pm UTC](https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521 "2020-11-27T20:15:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [27 בנובמבר,‏ 2020,‏ 8:15pm UTC](https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521/1 "2020-11-27T20:15:26Z")

</div>

Would this be possible? I’ve been appending a link to the forum home page to tweets but would rather do without the image. I guess the `opengraph image` Is used (currently I haven’t uploaded one).

Is there a way of getting rid of the image altogether? None of my topics will have images either so I’d be happy to do this site-wide.

As a second best, what if upload a really small logo to `opengraph image`? Would Twitter just resize it to be the same as it is now?

Thanks.

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [29 בנובמבר,‏ 2020,‏ 11:01am UTC](https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521/2 "2020-11-29T11:01:19Z")

</div>

I’ve had a look and just need to get rid of:

```plaintext
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="filename.png">

```

Would this be possible somehow?

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [29 בנובמבר,‏ 2020,‏ 12:10pm UTC](https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521/3 "2020-11-29T12:10:41Z")

</div>

> [@Jonathan5](#):
>
> ```plaintext
> <meta name="twitter:card" content="summary">
> <meta name="twitter:image" content="filename.png">
> 
> ```

Yes, it is possible 🙂

You can write a plugin to override the `crawlable_meta_data` method in this module:

> <https://github.com/discourse/discourse/blob/e1fbd56f6f2a38cb348eee1b38b6efa0ae9f1f37/app/helpers/application_helper.rb>

Everything is possible with software … very little with computer software is “not possible” 🙂

You can also, more-than-likely, just match and delete with pups but that is, for the most part, frowned upon by the meta team.

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [29 בנובמבר,‏ 2020,‏ 12:51pm UTC](https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521/4 "2020-11-29T12:51:38Z")

</div>

Thanks. I will look into how to create a Discourse plugin and how Ruby works!

In general, though, will I have to replace the whole method, and look out for relevant changes on every Discourse upgrade?

…

Creating a plugin seems like something I won’t have time for in the short term. What would happen if I found the relevant file in my Discourse installation and just commented out these lines each time I upgrade?

```ruby
    if opts[:twitter_summary_large_image].present?
      result << tag(:meta, name: 'twitter:card', content: "summary_large_image")
      result << tag(:meta, name: "twitter:image", content: opts[:twitter_summary_large_image])
    elsif opts[:image].present?
      result << tag(:meta, name: 'twitter:card', content: "summary")
      result << tag(:meta, name: "twitter:image", content: opts[:image])
    else
      result << tag(:meta, name: 'twitter:card', content: "summary")
    end

```

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [30 בנובמבר,‏ 2020,‏ 2:26am UTC](https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521/5 "2020-11-30T02:26:08Z")

</div>

> [@Jonathan5](#):
>
> What would happen if I found the relevant file in my Discourse installation and just commented out these lines each time I upgrade?

When you upgrade these files are overwritten when the Discourse repo is pulled into your workspace (folder); so you cannot simply “comment out” lines in a file because those files will be overwritten.

Although there are myriad ways to do things in the world of tech possibilities, the generally accepted way to modify the core is via a plugin, as mentioned earlier.

Generally speaking, in this case you would override the method in that module with your code.

Best to create a development environment because you do not want to break your production application.

This is a relatively simple plugin to write, but since you are not yet experienced with this style of development, you might consider posting over in #Marketplace and asking one of the well-heeled developers who make a living developing plugins to help you.

Otherwise, you can set up a development environment and have fun learning to develop Discourse plugins.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [30 בדצמבר,‏ 2020,‏ 2:26am UTC](https://meta.discourse.org/t/link-to-forum-on-twitter-with-no-image-remove-meta-tags/171521/6 "2020-12-30T02:26:12Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
