Image Attachment Issue after upgrade to 3.2.1

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 23534
Joined: Fri Aug 29, 2008 9:49 am

Re: Image Attachment Issue after upgrade to 3.2.1

Post by Mick »

What does/did the bug report say, have you got a link to it?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • There will be legions of cricket lovers of both genders through whose lips the abomination ‘BATTER’ will never pass so long as we live” - Simon Heffer - Telegraph
mrix2000
Registered User
Posts: 1054
Joined: Sun Dec 03, 2006 2:23 pm

Re: Image Attachment Issue after upgrade to 3.2.1

Post by mrix2000 »

Mick wrote:
Tue Nov 28, 2017 12:13 pm
What does/did the bug report say, have you got a link to it?
Hello Mick, here is the ticket https://tracker.phpbb.com/browse/PHPBB3-15456?filter=-2

I am not really sure what happens next ? will the issue get looked at ? will there be an update at some point ? not really sure what happens from here :?


Thanks
mrix
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Image Attachment Issue after upgrade to 3.2.1

Post by canonknipser »

AS far as I read the linked tickets and commits, this issue will be fixed with the (hopefully soon) upcoming version 3.2.2
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 4921
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Image Attachment Issue after upgrade to 3.2.1

Post by thecoalman »

Mick wrote:
Tue Nov 28, 2017 12:13 pm
What does/did the bug report say, have you got a link to it?
The .jpg image can contain the original dimensions in the EXIF data. When a file is edited the software may not alter it. phpBB is reading the EXIF data instead of determining the the actual dimensions of the image. Saving as .png or .gif will strip the EXIF data. If you "save for web" or specifically remove the EXIF data in the .jpg the issue goes away.

If you want to kill three birds with one stone..... Avatar resizing, sideways image fix and semi fix for this issue you can set imagemagick in the control panel for image processing. If your server does not have imagemagick installed this will not work. This is very hackish but it fixes multiple problems.....

On line 227 of \avatar\driver\upload.php

Find:

Code: Select all

			$file->move_file($destination, true);
After add:

Code: Select all

			@passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -auto-orient -quality 85 -geometry 120x120' . ' "/full/path/to/your/forum/images/avatars/upload/' .  $file->get('realname') . '" "/full/path/to/your/forum/images/avatars/upload/'' . $file->get('realname') . '"');
			list($width, $height) = getimagesize('/full/path/to/your/forum/images/avatars/upload/'' . $file->get('realname'));
You need to edit in the paths and where it says 120x120 that is where you will set the avatar size. Last step here is to set the file dimensions for the avatar in the ACP to some high amount.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
Post Reply

Return to “[3.2.x] Support Forum”