• Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.2.1
    • Fix Version/s: None
    • Component/s: Posting
    • Labels:
    • Environment:
      CentOS 7, PHP 7.0.22


      Phones, cameras and other devices often use the orientation flag in the EXIF meta data, For portraits the raw file data is flipped sideways but most browsers support this flag and flip the image to the correct orientation.

      plupload handles this correctly when resizing client side and preserves the EXIF data. Thumbnails processed by phpBB have the EXIF data stripped and the browser orients the image based on the raw file, sideways if it's s portrait.

      Both Imagemagick and GD can handle this, for example if Imagemcick is selected for image manipulation on line 564 of includes/functions_posting.php if you add the -auto-orient flag you get the desired orientation for the thumbnail.

      @passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -auto-orient -quality 85 -geometry ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" "' . str_replace('\\', '/', $destination) . '"');

      AFAIK Imagemagick should not be stripping the EXIF data to begin with, not sure why it is being stripped. Might be something to explore.

      For GD to handle it correctly I believe the EXIF extension would need to be installed. I would propose a suitable solution may be having plupload handle thumbnail creation, that would avoid issues with server side compatibility.




            • Assignee:
              thecoalman thecoalman
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: