Page 1 of 1

Resizing images for forums

Posted: Mon Aug 16, 2021 11:54 am
by alethe
Kind of a question, kind of a suggestion...

Currently, images using the IMG tag do not resize. This means that, in order to fit the image in the forum space, they must be resized manually by the user. I've been doing this via discord previews, but the quality gets lowered drastically.

Is there a way to do this in the forum coding itself? OR is there a setting somewhere that needs to be flipped on for images to be resized automatically to fit in the forum's textbox space?

Re: Resizing images for forums

Posted: Mon Aug 16, 2021 12:48 pm
by Neamara
There is a resize image BBCode we've had for a while, but it wasn't shared publicly due to the lack of restrictions we could impose to prevent abuse, since it doesn't tie into the restrictions of normal IMG tags. As of the last forum upgrade, it's been enabled for Image & Media Tags usergroup members thanks to an added extension.

Code: Select all

[url=Full Size URL][rimg=640]Direct Image URL[/rimg][/url]
I'll see if there are any ways to enforce automatic resizing without resorting to that BBCode. (I realize I did say the forum will handle image resizing in the Wolf Artwork instructions sticky, which I'll address -- the error came from thinking attachment logic, not IMG bbcode logic. My bad! 😰)

Re: Resizing images for forums

Posted: Mon Aug 16, 2021 4:07 pm
by alethe
okie, lemme try this out real quick...



well it previews correctly. let's see if it stays the same when i hit the real submit...

edit: oh perfect! thank you for plugging that in neam!

Re: Resizing images for forums

Posted: Mon Aug 16, 2021 10:02 pm
by Sambhur
I was actually trying to work out which resize code this forum uses the other week so I'm really glad this got brought up. Thanks!

Re: Resizing images for forums

Posted: Fri Aug 20, 2021 10:17 am
by DaniBeez
Wait, I thought too-large images were already being automatically resized with respect to width on the forums? I wasn't doing anything special on my phone photography thread for resizing, for example. Good to know there is a manual option, though. Just confused about if automatic resizing is happening or not?! Is it only occurring in certain areas?

Re: Resizing images for forums

Posted: Fri Aug 20, 2021 6:50 pm
by Sambhur
DaniBeez wrote:
Fri Aug 20, 2021 10:17 am
Wait, I thought too-large images were already being automatically resized with respect to width on the forums? I wasn't doing anything special on my phone photography thread for resizing, for example. Good to know there is a manual option, though. Just confused about if automatic resizing is happening or not?! Is it only occurring in certain areas?
I was actually under this impression as well and am also curious to know the answer. I only wanted to know about manual resizing for my own convenience/preference ahaha.

Re: Resizing images for forums

Posted: Sat Aug 21, 2021 9:08 pm
by Neamara
Well, we can certainly test that... here's a 1920x1080 screenshot using vanilla image tags.
Image
I've checked the result in each of the installed styles. It does!

I know older board versions didn't auto-resize anything, so it's nice to know that phpBB is capable of it now. I'm going to leave rimg tags available in case anyone wants to use it for manual on-site resizing.

Re: Resizing images for forums

Posted: Sat Aug 21, 2021 9:27 pm
by Sambhur
Awesome, thanks Neam! And yeah, I still think that manual resizing is still very needed for stuff like non-landscape images lmao.

Re: Resizing images for forums

Posted: Sun Aug 22, 2021 7:47 pm
by DaniBeez
Thanks, good to know 👍