Automatic Resizing of Uploaded Avatars

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.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.
doenwenu
Registered User
Posts: 1
Joined: Mon Aug 04, 2014 5:12 pm

Re: Automatic Resizing of Uploaded Avatars

Post by doenwenu »

Kamahl19 wrote:Resizing avatar is part of process of uploading avatar. And this process of uploading is really simple, it does not include even resizing avatar. Thats what I meant.
I would rather remove the whole uploading avatar system from phpbb and replace it with gravatar.
Gravatar is ugly. Why you like this option?

User avatar
Louis7777
Registered User
Posts: 385
Joined: Fri Apr 04, 2014 12:32 am

Re: Automatic Resizing of Uploaded Avatars

Post by Louis7777 »

I think this needs a little bit of caution if it's ever going to be implemented. Let's say that the maximum dimensions for uploaded avatars are 120x120 pixels and the maximum file size is 12.00 KiB.

1. What happens if you upload an image greater than 12 kilobytes? Does it get rejected or does the system try to lower its quality and/or file size?
2. What happens when the system resizes an image greater than the 120x120 pixels limit, and its file size is still above the limit? Does it get rejected or does the system try to lower its quality and/or file size?
3. And if the images are not rejected according to the file size limit, then when are they rejected? When they are over php's upload_max_filesize? And if that is the case and the upload_max_filesize is 10 megabytes, does that mean that users will be able to upload 9MB images?
4. When a user uploads a larger image he will have a legitimate expectation to see it uploaded without any quality loss since going from bigger to smaller shouldn't affect the quality. What if the resized image is above the file size limit and the system lowers the quality of the uploaded avatar?

User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: Automatic Resizing of Uploaded Avatars

Post by Sumanai »

Louis7777 wrote:And if the images are not rejected according to the file size limit, then when are they rejected? When they are over php's upload_max_filesize? And if that is the case and the upload_max_filesize is 10 megabytes, does that mean that users will be able to upload 9MB images?
There is a javascript library to resize images on the client side. This will reduce the load on the server and immediately show view avatars given the limitations, to upload to the server.
Last edited by Sumanai on Tue Aug 05, 2014 1:00 pm, edited 1 time in total.
Sorry for my English.

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: Automatic Resizing of Uploaded Avatars

Post by Pony99CA »

Sumanai wrote:
Louis7777 wrote:And if the images are not rejected according to the file size limit, then when are they rejected? When they are over php's upload_max_filesize? And if that is the case and the upload_max_filesize is 10 megabytes, does that mean that users will be able to upload 9MB images?
There is a javascript library to resize images on the client side. This will reduce the load on the server and immediately show posvolit view avatars given the limitations, to upload to the server.
JavaScript or not, the user should definitely see a preview of the avatar (or any image, for that matter) before it gets uploaded (with a message saying that the avatar was too large and has been resized).

Steve

P.S. What does "posvolit" mean?
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: Automatic Resizing of Uploaded Avatars

Post by Sumanai »

Do not pay attention, English is not my native language.
Sorry for my English.

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

Re: Automatic Resizing of Uploaded Avatars

Post by DavidIQ »

doenwenu wrote:
Kamahl19 wrote:Resizing avatar is part of process of uploading avatar. And this process of uploading is really simple, it does not include even resizing avatar. Thats what I meant.
I would rather remove the whole uploading avatar system from phpbb and replace it with gravatar.
Gravatar is ugly. Why you like this option?
Gravatar is simply a service that displays an avatar and phpBB was modified to accommodate using this service. It's not "ugly" by any means but in any case...who cares what it looks like if all it does is serve up an image, at least as far as the forum itself is concerned? :roll:
Image

Post Reply