Integrating automatic image resizing

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
mp777
Registered User
Posts: 2
Joined: Sun Aug 26, 2012 8:24 pm

Integrating automatic image resizing

Post by mp777 »

I would like to request that you integrate automatic image resizing with the next phpbb upgrade. I think this is a common enough feature that it should be an integral part of phpbb. I hate reinstalling the mod every time something goes wrong and it's the only mod i do install every time because I think it's one of the key features of a forum.

every major forum i've been on has had images of some type on it. people, especially guys, are visually orientated and i can't tell you how many images i've come across on the various forums i visited. i'd say it was almost a staple.

now maybe i don't visit programming forums, so that might be the issue. but i think the very fact that we even have [img] tags speaks to the importance of having this feature included. it seems like common sense that if you have img tags in the default phpbb code, obviously you're going to be using images at some point. and if you're using images, obviously some of them are going to be bigger than the forum size. so it seems like a valid conclusion that an automatic resizer should come standard with the forum code.

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Integrating automatic image resizing

Post by callumacrae »

+1
Made by developers, for developers!
My blog

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

Re: Integrating automatic image resizing

Post by DavidIQ »

Which MOD are you referring to? ReIMG image Resizer? Or some other image resizing MOD? If the former then I already have plans to rewrite it for jQuery and adapting to 3.1.
Image

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

Re: Integrating automatic image resizing

Post by Meis2M »

+1 for ReIMG

User avatar
Pico88
Registered User
Posts: 73
Joined: Tue Apr 12, 2011 2:32 pm

Re: Integrating automatic image resizing

Post by Pico88 »

+1 for jQuery or ReIMG

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Integrating automatic image resizing

Post by callumacrae »

Does it need a MOD? It's about six lines of JS xD
Made by developers, for developers!
My blog

User avatar
canonknipser
Registered User
Posts: 71
Joined: Mon Sep 19, 2011 4:42 am
Location: Germany

Re: Integrating automatic image resizing

Post by canonknipser »

Is the request about [img]-Images or attachment-images?
For attachments, there is already a resizing for the optionally generated thumbnails, so maybe this code can be used during upload-process.

For [img], any kind of resizing can only be done in the browser (eg. by width/height - Parameter for the <img>-html), so there is no benefit on the number of bytes transported to the end-user. Otherwise you have to download the image from the [img]-tag-location and store it in the forum-data - this means "content-stealing"
Greetings
Frank
phpbb.de support team member - no support via PM or mail
English is not my native language
Extensions and scripts for phpBB

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Integrating automatic image resizing

Post by callumacrae »

I assumed that it was for [img] tags - if an image is currently too wide, the right bit is hidden. It's possible to make JS resize it so that all of it is displayed, and if someone clicks on it then it goes back to normal size.
Made by developers, for developers!
My blog

User avatar
canonknipser
Registered User
Posts: 71
Joined: Mon Sep 19, 2011 4:42 am
Location: Germany

Re: Integrating automatic image resizing

Post by canonknipser »

callumacrae wrote:... if an image is currently too wide, the right bit is hidden.
I think its depending on the style. It must be defined in the css (overflow:hidden or similar), other style may use no clipping.
callumacrae wrote:It's possible to make JS resize it so that all of it is displayed, and if someone clicks on it then it goes back to normal size.
Much simpler: on click open in new window - then Browser can decide (most often defaulted to "fit in windows" , after click magnify to 100%) - should be available in almost every modern browser.
On phpbb.de they use a function to change all [IMG]-Tags for external images to a [URL] with the link-text "externes Bild" (external Image).

So it is just a piece of comfort - the "resize" will be a image with the same number of bytes on clients side, only shrinked in width and height. If you put in a image of 50MB and 5000*4000 px and tell your function to resize it to 500*400 px, the image will still have 50MB send to end users browser. And my mobile "flat rate" with 500MB each month is gone after a few images of 500*400. :roll:

Isn't it better to block image of that size (check in posting function may be a way to do this, if we can read the images header on the remote side) and tell the poster to use a smaller version of the image or the attachment function with newly created automatic resizer?
Greetings
Frank
phpbb.de support team member - no support via PM or mail
English is not my native language
Extensions and scripts for phpBB

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

Re: Integrating automatic image resizing

Post by keith10456 »

canonknipser wrote:So it is just a piece of comfort - the "resize" will be a image with the same number of bytes on clients side, only shrinked in width and height. If you put in a image of 50MB and 5000*4000 px and tell your function to resize it to 500*400 px, the image will still have 50MB send to end users browser. And my mobile "flat rate" with 500MB each month is gone after a few images of 500*400...
If you're viewing the post the image would already be resized - correct? So you wouldn't have to worry about your data cap.

If you're doing the posting (worrying about your data cap) then you wouldn't post an image of that size anyway.


+1 for the default image resizer.
Last edited by keith10456 on Mon Aug 27, 2012 8:56 pm, edited 1 time in total.

Post Reply