Resizing Images in [img]...[/img] tag

Make requests and get help.

Moderator: Manveer

Post Reply
User avatar
alek
Registered User
Posts: 2416
Joined: Sat Mar 03, 2018 4:11 pm
Location: 2 goblinz under age 8
Age: 40

Resizing Images in [img]...[/img] tag

#1

Post by alek » Fri May 20, 2022 7:28 am

Hi,

Is there a way to resize an image that been placed inside the img tags?

Code: Select all

[img resizeCommandsGoHere]somePicture[/img]
Before you respond, please assume I'm an idiot when it comes to coding... because I am.

User avatar
mgil
Shitpostmaster General
Posts: 8207
Joined: Wed Sep 13, 2017 5:46 pm
Location: FlabLab©®
Age: 47

Re: Resizing Images in [img]...[/img] tag

#2

Post by mgil » Fri May 20, 2022 4:47 pm

alek wrote: Fri May 20, 2022 7:28 am Hi,

Is there a way to resize an image that been placed inside the img tags?

Code: Select all

[img resizeCommandsGoHere]somePicture[/img]
Before you respond, please assume I'm an idiot when it comes to coding... because I am.
Not that I know of. I thought it just displayed the image scaled to display.

User avatar
alek
Registered User
Posts: 2416
Joined: Sat Mar 03, 2018 4:11 pm
Location: 2 goblinz under age 8
Age: 40

Re: Resizing Images in [img]...[/img] tag

#3

Post by alek » Mon May 23, 2022 3:57 pm

mgil wrote: Fri May 20, 2022 4:47 pm
alek wrote: Fri May 20, 2022 7:28 am Hi,

Is there a way to resize an image that been placed inside the img tags?

Code: Select all

[img resizeCommandsGoHere]somePicture[/img]
Before you respond, please assume I'm an idiot when it comes to coding... because I am.
Not that I know of. I thought it just displayed the image scaled to display.
Makes sense; thanks.

User avatar
BenM
Registered User
Posts: 3493
Joined: Sun Sep 17, 2017 7:18 pm
Age: 46

Re: Resizing Images in [img]...[/img] tag

#4

Post by BenM » Sun May 29, 2022 5:59 am

How's this - I just created a new BBCode, [imgrs]

Use it the same as the [img] BBCode, but with a percentage to resize the image (based on the width of the forum). So to resize it to 50% you'd go like [imgrs=50]https://path/to/image[/imgrs]

I'll test it in the next post....

User avatar
BenM
Registered User
Posts: 3493
Joined: Sun Sep 17, 2017 7:18 pm
Age: 46

Re: Resizing Images in [img]...[/img] tag

#5

Post by BenM » Sun May 29, 2022 6:06 am

Resize to 10%


Resize to 50%


Resize to 80%


Seems like it!

PS I just stole the code/idea from someone else on another forum, can't take all the credit.

User avatar
mgil
Shitpostmaster General
Posts: 8207
Joined: Wed Sep 13, 2017 5:46 pm
Location: FlabLab©®
Age: 47

Re: Resizing Images in [img]...[/img] tag

#6

Post by mgil » Sun May 29, 2022 6:15 am

Nice work! @BenM

User avatar
alek
Registered User
Posts: 2416
Joined: Sat Mar 03, 2018 4:11 pm
Location: 2 goblinz under age 8
Age: 40

Re: Resizing Images in [img]...[/img] tag

#7

Post by alek » Tue May 31, 2022 8:51 am

Yes! That’s great!

Post Reply