Improve/increase size of inline images

Is there a way to improve the display of inline images?

Particularly, the current display focuses very heavily on the name of the file (generally useless information) rather than the image itself, and there’s generally a lot of white space. I think it would be much nicer if the image itself took priority and was larger.


In-line image

Uploaded image

CC BY-SA 4.0 Dreerwin. No changes made.

Or is this an upstream issue that can’t be adjusted locally?

The first example isn’t a link to an image, it’s a link to a website. The website happens to be a Wikimedia Commons image description page, but that fact doesn’t affect change how Discourse displays the link, and the text is (I believe) controlled through the metadata provided by the website that is being linked.

It is actually possible to include images in a post without first having to download and re-upload it, but to do so, you need to paste a link to the image itself, not a site containing that image. In the case of a Wikimedia Commons image, you can get to the image itself by clicking on the down-scaled version contained in the description page.

For example, inserting the link

As an aside, please check licenses before including images in a post. Your example image is published under a license which requires attribution to the creator of the image.

Ahh OK. Thanks, I’ll make sure to paste the direct link to the image in future.

Perhaps naively, I had assumed adding the direct link to the Wikimedia commons source (where all the licence info is stored) was me doing so “in any reasonable manner”. I’ll edit my original post to be absolutely sure though.

Wikimedia wikis, including Wikimedia Commons, require contributors to agree that a hyperlink is sufficient attribution. However, you can of course provide more explicit attribution as a courtesy.

I would recommend continuing to link to the file description page rather than the raw image. The raw image URL is not a permalink: it will break (becoming unreachable) if someone uploads a new revision, for example to perform a touchup or correct metadata.

Commons also has a system for tracking images that OSM uses, to avoid needlessly breaking us by renaming files. This system doesn’t work if you use a raw image URL. That said, I think it’s only actively tracking the OSM database and wiki, not this forum yet.


This is how the onebox works in general, but Discourse has overrides for a select few websites, including Wikimedia Commons. If not for this override, I think the onebox would even include a short description from the description page. By comparison, the onebox override for Flickr shows the image by itself, sized to fit the width of the post.


This is interesting and is essentially what I was asking for here.

Thanks for the other points about linking to the page, rather than the image. So it seems perhaps that my original ask remains.

1 Like

I wasn’t aware of that, and wonder if someone, such as myself, who has CC-BY-SA photos on Flickr and elsewhere can agree to that if someone else uploads them to the Commons.

I’m not an expert on this, but the Wikimedia terms of service would be binding on the contributor rather than the original artist.

Commons has a specific template for indicating that the photographer wants a particular form of attribution under CC BY-SA 2.0. If you see a request like that, you should heed it, just in case. There was a high-profile case in which a photographer started suing people for following that request but with slightly different punctuation.

Newer versions of the license make it harder for authors to go after reusers on technical grounds. Creative Commons publishes a best practices guide for attribution that provide a safe harbor in a similar manner as OSMF’s attribution guidelines.

Regardless, the onebox template squishes the image into such an inscrutably small thumbnail that it would be much easier to argue that it’s fair use. If you link to the original image for the purpose of showing the image at a more comfortable size, you’d want to pay closer attention to attribution requirements.

So searching Commons for Casey’s original image gives: Search media - Wikimedia Commons & you can then click on that particular photo, but which option should we then link to from that page?

The .jpg or the [[File:xxxx]] ?

This is a Discourse forum, so the [[File:…]] syntax doesn’t work here. If you want a onebox for this image:,_Pinehouse.jpg


1 Like