- πΊπΈUnited States RowboTony
Update with my own experience. I'm using DDEV with Acquia Migrate Accelerate to move a D7 site to D9. All of my images were broken and wouldn't display. The original images were there, media uploads worked fine, file system permissions were correct, PHP, GD, etc were good.
The DDEV
seconddocroot.conf.example
has the following line, when removed, thenddev restart
, it worked - my images were back, and now the styles were being properly generated!If you are running Nginx, and you have image generation problems, this is still relevant.
# Expire rules for static content # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; access_log off; add_header Cache-Control "public"; }
- Status changed to Active
about 1 year ago 10:35am 29 October 2023 - πΈπ°Slovakia poker10
I am not sure where this directive come from:
# Set images and js to expire in a very long time location ~* \.(ico|css|pdf|jpg|jpeg|png|gif|js|xml|js|woff|woff2|ttf|svg|eot)$ { expires 7d; }
In all examples/recommended configs for Nginx I see that there is an additional line:
try_files $uri @rewrite;
See:
- https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
- π Add a sample nginx configuration file Closed: duplicate
- β¨ Provide documentation/default server block for Nginx server. Needs work
As far as I know, these configs are working without need to remove the whole directive used for caching static content.
The Issue summary should at least include the full nginx config used on sites experiencing this and clear steps to reproduce. Thanks!
Core currently does not supply an example nginx config unless this is in β¨ Provide documentation/default server block for Nginx server. Needs work , so I think that this seems like more a Support request (not sure anything can be done here until that issue is committed and there is an estabilished default config supported by core). So I think we can either make this a Support request, or postpone it.