Does S3FS support image styles when using the private file system? With this patch (https://www.drupal.org/node/1695068#comment-8953159) to the Imagemagick module I've had success generating derived images that are stored on S3, but it only seems to work when S3 File System is used as the upload destination.
When the private file system is selected, the URL for the image doesn't come from S3 (which I think is expected) and my console shows something like the following:
GET http://domain.com/system/files/styles/STYLENAME/private/filename.jpg?itok=4HqqbPyf 503 (Service Unavailable)
This is the most relevant-looking entry in the logs:
User error: ImageMagick error 1: convert: Not a JPEG file: starts with 0x3c 0x21 `/tmp/magick-1306V7tKOrqSu4rd' @ error/jpeg.c/JPEGErrorHandler/322. convert: NoDataReturned `http://domain.com/system/files/filename.jpg' @ error/url.c/ReadURLImage/263. convert: NoImagesDefined `/tmp/6b09173fd96742d4b3b696247e8f2949-filename.jpg' @ error/convert.c/ConvertImageCommand/3210. in _imagemagick_convert_exec() (line 541 of /app/web/sites/all/modules/imagemagick/imagemagick.module).
BTW, I have Drupal running on Heroku with nginx; other than this hiccup with private image files, S3FS has been instrumental in making it possible, so my thanks to you!
Comments
Comment #1
katrien_w commentedHello, did you ever find a solution for private image styles with nginx?
Comment #2
Anonymous (not verified) commentedOh goodness, I appear to have missed this issue entirely when it was first posted. Sorry about that, charliekwin!
The private filesystem has been notoriously "weird" when it comes to s3fs's interactions with it, so I'm not entirely sure if it'll be possible to remedy this, or even why it would be a problem in the first place. From your error message, I'd guess that ImageMagick is possible not providing the correct credentials when requesting the
http://domain.com/system/files/filename.jpgurl, so Drupal is refusing to give it the file. But that's essential an uneducated guess at this point.Unfortunately, I don't currently have time to debug this issue, as I'm working on a time-sensitive project at work this week. I'll try to get to this early next week, though.
Comment #3
Anonymous (not verified) commented@charliekwin: So I tested this out, and unfortunately I wasn't able to reproduce the issue you're having. Though that may be because I'm not using ImageMagick? I would actually be surprised to learn that ImageMagick works at all with the normal private filesystem, based on the description they give for how the module works.
@katrien_w: What exact problem were you encountering? Were you using ImageMagick, too?
Comment #4
Anonymous (not verified) commentedDid you ever resolve this problem?
Comment #5
cmlaraDrupal 7 end-of-life triage:
Drupal 7 will reach end of life on January 5th.
The 7.x branches of S3FS do not have any additional planned releases.
The functions in this issue do not appear to exist in Drupal 8+ as such I am going to close this support request as outdated.