Add image width to the [img] tag

Started by pictureposter, May 12, 2022, 05:19:03 AM

Previous topic - Next topic

pictureposter

Posting large images break the formatting of a post and reach out far to the right with essential parts hidden.

As large images are often necessary to provide the details one needs to transport (think of text and noted in plans or circuit diagrams), uploading a scaled down version to not to break the post formatting is often not possible.

Hence, I want to suggest to make a very simple to implement, but easy solution to the problem: Add an optional width tag to the [img] tag.

If it's available [img width="250"][/imp], it's rendered to the html <img width="250"></image> tag.
If it's not available [img width="250"][/imp], the width is added with a default value like <img width="800"></image> (or whatever is sensible for most of the installations or even dependent on eventually existing settings. I am not familiar enough to know the details).

This would enhance usability extremely with close to none effort.

Thanks for consideration!

Arantor

SMF has supported the width parameter for at least 10 years (I don't remember if it was in 1.1 but it's definitely in 2.0) and it's tagged as optional.

I don't remember if 2.1's theme sets a proportional max-width in the CSS though (since you don't always want to force the size to a pixel width if the size is wider than a device)

shadav

pretty sure 2.1 has images set for responsiveness, most theme developers add extra/better css to image tags though
and well there's also in the admin settings to set max width and height for images as well

but yeah for the bbc pretty sure that's always been there, it's just not used by people often

FrizzleFried

Stock IMG:



IMG width=250 (no quotes around number ...though it may worth WITH?)



IMG width=100


Oldiesmann

Quote from: Arantor on May 12, 2022, 05:25:41 AMSMF has supported the width parameter for at least 10 years (I don't remember if it was in 1.1 but it's definitely in 2.0) and it's tagged as optional.

It was definitely in 1.1 and I think it was in 1.0 as well.
Michael Eshom
Christian Metal Fans

Advertisement: