A project I just started maintaining had patched the autorotate submodule to support files stored using the S3fs module, so I thought I'd upload it for consideration.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.38 KB

The changes which have been in use for several years on a production site.

fietserwin’s picture

Status: Needs review » Fixed

Thanks for posting this feature. I will commit it with the following changes:

  1. +++ b/autorotate/imagecache_autorotate.module
    @@ -131,8 +131,26 @@ function image_gd_imagecache_autorotate(stdClass $image) {
    +    $uniq = md5(time() . $image->source);
    

    I wil change this into microtime() as getting name clashes is as simple as showing the same image twice on the same page, even with different image styles applied.

  2. +++ b/autorotate/imagecache_autorotate.module
    @@ -131,8 +131,26 @@ function image_gd_imagecache_autorotate(stdClass $image) {
    +  if ($exif === FALSE && isset($image->extension) && $image->extension === 'jpg') {
    

    This change triggered me to have a better look at this line and it turns out this line is bogus, and always has been: it should be $image->info['extension'], or even better $image->info['mime_type'], but the mime type has already been checked in imagecache_autorotate_effect(), so we can just leave that out.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.