Control width of an embedded image inside a post

abdfahim

Well-known member
When I embed an image inside a post, it is always displayed in a fixed-width small box even if the image has higher resolution. In times, I prefer to display an image at the maximum width (spanning the whole post area), but there is no option for that.

As an example, there is no way I could display the lion image with 100% width of this post body. Appreciate if such an option can be introduced.

 
Upvote 0
How do you see this embedded image?



lion+wallpapers+(2).JPG
 
Ah, I see here there is a difference between image embedded from media gallery and image embedded via URL.

You can upload to media gallery, then right click to get image location URL and add that via the insert image icon. It is 100% but of course you done't get the caption. To get that, you need to use the embed code from the Share this media box in gallery and it is a set size (see second pic)

Via URL

full


Same image using the embed code from Media gallery

 
Last edited:
Oh, right. That would work for me as well, thanks! So, all I need to do is to embed it using "insert image" button and url to the gallery item instead of using the "Gallery embed" button. Got it.
 
But, you can change the specified size of the gallery embed code by adding this to extra.less

CSS:
.embeddedMedia
{
    width: 100% !important;
}

That seems best of both worlds, 100% AND caption.
 
There probably needs to be more control over how Gallery images are embedded in posts.

In XenForo 1.5.x there is this:

1527769456842.webp

In XenForo 2.0 these options seem to have disappeared (at least I can't find them).
 
Top Bottom