[3.2][RC] Avatar Resize on upload

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Affin
I've Been Banned!
Posts: 254
Joined: Fri May 25, 2018 9:52 pm

Re: [3.2][RC] Avatar Resize on upload

Post by Affin »

I have downloaded and it does not work for me, has 3.2.3
Affin
I've Been Banned!
Posts: 254
Joined: Fri May 25, 2018 9:52 pm

Re: [3.2][RC] Avatar Resize on upload

Post by Affin »

It does not look like ext?
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][RC] Avatar Resize on upload

Post by Ger »

It works fine on 3.2.3. If it doesn't work for you then you should provide some more info than just that.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
sp3ctre
Registered User
Posts: 321
Joined: Sun Jul 15, 2007 11:06 am

Re: [3.2][RC] Avatar Resize on upload

Post by sp3ctre »

When I test it using images taken on a phone they appear sideways in the avatar. The same image posted on the forum is the correct orientation.
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][RC] Avatar Resize on upload

Post by Ger »

That's probably since the forum (post/pm) upload uses plupload while the avatar upload doesn't.

Is my assumption correct that you use ImageMagick on your board? If so, could you pass me the original file from the phone (through some filesharing service that doesn't touch the image itself)?
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
sp3ctre
Registered User
Posts: 321
Joined: Sun Jul 15, 2007 11:06 am

Re: [3.2][RC] Avatar Resize on upload

Post by sp3ctre »

Supposed to be using ImageMagick, yes:

https://www.dropbox.com/s/d260lyrlo717m ... g.zip?dl=0

Zipped it up so there shouldn't be any manipulation
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][RC] Avatar Resize on upload

Post by Ger »

Thanks!

I've set my test board (without this extension) to allow for 1300x1300px/10MB avatars and uploaded this file. It's also rotated.

Maybe I can alter the extension to also cope with this, but actually it's more of a phpBB bug than something else.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
sp3ctre
Registered User
Posts: 321
Joined: Sun Jul 15, 2007 11:06 am

Re: [3.2][RC] Avatar Resize on upload

Post by sp3ctre »

Cool, thanks, it is also rotated when I use most online image resizers, but when I look at the EXIF it says "Orientation : Rotate 90 CW", so you would imagine things would respect that. Maybe an oddity with IOS?
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][RC] Avatar Resize on upload

Post by Ger »

sp3ctre wrote: Mon Nov 12, 2018 1:55 pm Maybe an oddity with IOS?
Sort of. But as I understand it, it's also an oddity in Android so basically >90% of the phone and tablet users will have this issue. We can't really ignore it than, can we?

When I have some more spare time I'll try to fix the rotation in this extension. I'll quote you when it's done so you'll get a notification.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
sp3ctre
Registered User
Posts: 321
Joined: Sun Jul 15, 2007 11:06 am

Re: [3.2][RC] Avatar Resize on upload

Post by sp3ctre »

Ger wrote: Mon Nov 12, 2018 1:58 pm
sp3ctre wrote: Mon Nov 12, 2018 1:55 pm Maybe an oddity with IOS?
Sort of. But as I understand it, it's also an oddity in Android so basically >90% of the phone and tablet users will have this issue. We can't really ignore it than, can we?

When I have some more spare time I'll try to fix the rotation in this extension. I'll quote you when it's done so you'll get a notification.
Much appreciated, thanks!
Peeagepeebeebee
Registered User
Posts: 45
Joined: Fri Jan 18, 2019 4:34 am
Location: Germany

Re: [3.2][RC] Avatar Resize on upload

Post by Peeagepeebeebee »

It would be nice if this Avatar Resize extension would actually strip the no longer required maximum pixel size limit info in the UCP (User Control Panel) > Profile > Edit Avatar.

So instead of showing:
Current image:
Maximum dimensions; width: 120 pixels, height: 120 pixels, file size: 800.00 KiB.

... it should just read:
Current image:
Maximum file size: 800.00 KiB.

This should be implemented in such a way, that it is compatible with the phpBB language packs out of the box, with no further tweaking required.

Follow-Up:
Just saw that this text string sits kind of pre-built in /language/ISO code here/ucp.php:

Code: Select all

'AVATAR_EXPLAIN'			=> 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.',
'AVATAR_EXPLAIN_NO_FILESIZE'		=> 'Maximum dimensions; width: %1$s, height: %2$s.',
Question is whether the extension can alter those lines on the fly or add AVATAR_EXPLAIN_NODIMENSION to it (question then would be how to deal with the various languages; perhaps language fields for the extension itself in the Admin Control Panel). Of course one can simply manually edit the ucp.php file, but that's another tweak to keep track of when updating.
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][RC] Avatar Resize on upload

Post by Ger »

Point is, that's only true for uploading avatars. When a board is set to also allow remote (or other type) avatars, this limitation would still apply. The extension only resizes avatars through avatar upload (either remote upload or direct upload) and in that case the limits set in ACP stil apply.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
Peeagepeebeebee
Registered User
Posts: 45
Joined: Fri Jan 18, 2019 4:34 am
Location: Germany

Re: [3.2][RC] Avatar Resize on upload

Post by Peeagepeebeebee »

Ger wrote: Mon Feb 04, 2019 1:47 pm Point is, that's only true for uploading avatars.
Good point. Side note on that, although not directly related to this extension: When Upload is the only Avatar submission option, the line with the pull-down menu should be hidden. Less distraction/confusion for the user.

Image
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][RC] Avatar Resize on upload

Post by Ger »

Yeah, I'll leave that one to the phpBB developers.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
AndrewUSA
Registered User
Posts: 23
Joined: Mon Jan 28, 2019 5:12 am
Location: California
Name: Andrew

Re: [3.2][RC] Avatar Resize on upload

Post by AndrewUSA »

Thanks, this works great!

It'd be nice if, in the ACP, the user's profile avatar page displayed the actual size of the resulting file, but that doesn't have anything to do with this extension, per se. (I was able to verify the compression/resize by inspecting the corresponding file on the server.)

Andrew
Post Reply

Return to “Extensions in Development”