Changing image size with code instead of resizing picture

Started by Esoterica, July 12, 2021, 03:21:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Esoterica

How do you resize an image using BB code, instead of actually changing the size and such?
"The image ALT here""The image ALT here"

Chasing Dreams

You'll use the code:
[img height=any number][/img]

You can also just change the width:
[img width=any number][/img]

Or you can use them together:
[img height=any number width=any number][/img]
Selectively Available for NEW stories.
Status ⋮ Around here somewhere.
Posts owed ⋮ 4 out of 11 
Posting Order (Click to see.)

Thank you Amaris for the beautiful signature!


Esoterica

"The image ALT here""The image ALT here"

Oniya

If you use both height and width, it will distort the image to make it fit.  To keep the proportions, pick the 'most important' of the two (what you're trying to make it fit) and let the other dimension auto-scale.

(Height 100)

(Width 200)

(height 100 width 200)
"Language was invented for one reason, boys - to woo women.~*~*~Don't think it's all been done before
And in that endeavor, laziness will not do." ~*~*~*~*~*~*~*~*~*~*~Don't think we're never gonna win this war
Robin Williams-Dead Poets Society ~*~*~*~*~*~*~*~*~*~*~*~*~*~Don't think your world's gonna fall apart
I do have a cause, though.  It's obscenity.  I'm for it.  - Tom Lehrer~*~All you need is your beautiful heart
O/O's Updated 5/11/21 - A/A's - Current Status! - Writing a novel - all draws for Fool of Fire up!
Requests updated March 17