[RFC] Default image resizing

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

[RFC] Default image resizing

Post by Ger »

Many boards encounter the problem with large posted images destroying the whole layout of their forum or otherwise the images being cutoff (depending on the used style). Both aren't really a good presentation of the forum.
Nowadays almost everyone posting a photo has taken that photo on a way to large resolution and have no idea of resizing it themselves or even think about the consequences. Therefore I always install the ReIMG Image Resizer by DavidIQ. Since it's one of the most popular MODs in de database for 3.0 and this is a very common issue, plus it destroys the layout, I think a prevention for should be build-in.

I recon the MOD mentioned above is pretty much OK to build in the core. Perhaps the more fancy stuff like the highslide and the lightbox should not be included by default, since it's only purpose is eyecandy. That's more for style-authors I think.

Another alternative is to resize the images server sided. That way you prevent large loading times for the user when there are many large images in a post. A start for an approach like that is in the topic [BETA] Auto Image Resize 0.0.3 (Non-JavaScript) in the modifications forum. That's a choice between server sided load and client sided load.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: [RFC] Default image resizing

Post by keith10456 »

I agree... An image re-sizer should be in the core. An uploaded image should not be allowed to break a style.

Ditto with the statement that they eye candy is not necessary.

Nelsaidi
Registered User
Posts: 122
Joined: Tue Nov 11, 2008 5:44 pm

Re: [RFC] Default image resizing

Post by Nelsaidi »

To be honest when resizing an image it should be made clear that the image has been resized, what forums typically do is have that orange/white/whatever bar saying "this image has been reiszed from Y x Z click to enlarge" .

But having it in core and the ability to disable (enable by default) would be cool.

User avatar
Meis2M
Registered User
Posts: 433
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] Default image resizing

Post by Meis2M »

image resizer is a good idea

GravityDK
Registered User
Posts: 36
Joined: Sat Aug 28, 2010 10:19 am

Re: [RFC] Default image resizing

Post by GravityDK »

As related issue, if implementing jQuery is accepted, then we could also use a jQuery lightbox to display attached images.
Perhaps this RFC could be broadened to consider handling of attachments to automatically create a small thumbnail, then on-click to display the full-sized version [this is instead of using DavidIQ's mod which does resizing client-side and thus the full-sized file is still downloaded initially, not a thumbnail].

I have the code for the latter in this thread. Not putting it here since it relates to broadening the original RFC.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: [RFC] Default image resizing

Post by Ger »

Well, I kinda like the idea of resizing server sided. On the other hand, I still think lightbox/highslide etc is just eyecandy. Nice, but it hurts performance on older machines. When lightbox or an alternative is implemented, the admin or the users should have the possibility to turn it off and fall back to simply opening the image in the browser window.

My thought now: when someone is attaching an image or posting an image with BBcode larger than in ACP enterend dimensions, a small thumbnail should be created and stored in the phpBB folder. When viewing a topic, this thumbnail should be shown. Clicking on the thumbnail should than result in either a lightbox or just the original image, depening on ACP/UCP settings.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

GravityDK
Registered User
Posts: 36
Joined: Sat Aug 28, 2010 10:19 am

Re: [RFC] Default image resizing

Post by GravityDK »

Ger wrote: My thought now: when someone is attaching an image or posting an image with BBcode larger than in ACP enterend dimensions, a small thumbnail should be created and stored in the phpBB folder. When viewing a topic, this thumbnail should be shown. Clicking on the thumbnail should than result in either a lightbox or just the original image, depening on ACP/UCP settings.
Agreed.
An admin like me can easily add the lightbox code on top of that implementation, or it could be an option in ACP/UCP as a nice modernising touch.

The key things for me are:
a) server-side creation of thumbnails for large images (using GD or ImageMagick, like now)
b) use of that thumbnail in the post, clicking on which opens the full-size image.

I much prefer a & b to resizing it using width parameter, and thus having the full-sized image therefore in the post itself, so clicking it just reveals the full-sized image. That doesn't give any gain to page loading speeds.

I have the code for that in my link above, fwiw, which I borrowed from air-box mod.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1836
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Default image resizing

Post by DavidIQ »

I don't think I like the idea of having locally stored thumbnails of images from external sites. I mean that would defeat the purpose of having the img BBCode tag which is to show an image without having it or anything related to it besides the link stored on the local forum. Then it becomes a bit more complicated if the image no longer exists at some point or if someone quotes such a post. Right now if you quote a post with an attached image you don't actually get the image although that could, of course, change.
Image

GravityDK
Registered User
Posts: 36
Joined: Sat Aug 28, 2010 10:19 am

Re: [RFC] Default image resizing

Post by GravityDK »

Good distinction. I did not mean to say we should have local thumbnails of remote images. My intended scope was for attached images.

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: [RFC] Default image resizing

Post by A_Jelly_Doughnut »

GravityDK wrote:As related issue, if implementing jQuery is accepted, then we could also use a jQuery lightbox to display attached images.
Please, anything but a lightbox. Although I would consider this a templating/styling issue :)
A_Jelly_Doughnut

Post Reply