S3FS module + Image style support
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
If you use the drupal/s3fs module (https://www.drupal.org/project/s3fs) with image styles, it changes all the image styles paths to start with /s3/files/styles/....
The current vhost default.conf file doesn't allow for generating image styles using that path, making all the image styles 404
Current (doesn't support S3FS module + image styles)
# Fighting with Styles? This little gem is amazing.
# location ~ ^/sites/.*/files/imagecache/ { # For Drupal <= 6
location ~ ^(/[a-z\-]+)?/sites/.*/files/styles/ { # For Drupal >= 7
try_files $uri @rewrite;
}
After much debugging for finding the root cause, I did the following and it works now. I don't know if it's the best way, but just thought I'd share if someone would want to contribute and commit into the recipe.
Fixed (at least for me)
# Fighting with Styles? This little gem is amazing.
# location ~ ^/sites/.*/files/imagecache/ { # For Drupal <= 6
location ~ '^(/[a-z\-]+)?/sites/.*/files/styles/|^/s3/files/styles/' { # For Drupal >= 7
try_files $uri @rewrite;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the vhost default.conf file and compare the existing Drupal image-style location rule with the reported S3FS path. Verify image-style URLs beginning with /s3/files/styles/ no longer return 404 while existing Drupal image styles continue to work; the issue's supplied configuration shows the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- drupal, nginx
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100