Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule for nginx and support for webp files #27

Open
hacksch opened this issue Jul 3, 2024 · 3 comments
Open

Rule for nginx and support for webp files #27

hacksch opened this issue Jul 3, 2024 · 3 comments

Comments

@hacksch
Copy link

hacksch commented Jul 3, 2024

Hello,

please extend the documentation for nginx with

if (!-f $request_filename) { rewrite ^/(fileadmin/_processed_/.+)\.(gif|jpg|jpeg|png|webp)$ /index.php; }
and please add support for webp files in the apache rule as well.

PS: great work

@xerc
Copy link
Contributor

xerc commented Aug 26, 2024

@hacksch can you please provide a (full & indented) NGINX conf.?

regarding APACHE you can write like this ..

  RewriteCond %{HTTP_ACCEPT} ^image/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule /_processed_/ %{ENV:CWD}index.php [L]

or try my v12 beta preview @ https://github.com/xerc/deferred-image-processing/tree/feature/support-typo3-cms-12 :)

@hacksch
Copy link
Author

hacksch commented Aug 27, 2024

This is my working nginx configuration

v11
if (!-f $request_filename) { rewrite ^/(fileadmin/_processed_/.+)\.(gif|jpg|jpeg|png|webp)$ /index.php; }

v12
if (!-f $request_filename){ rewrite "/fileadmin/_processed_/.+_([0-9a-f]{10})\.(gif|jpe?g|png|webp)$" /index.php?dip[chk]=$1&dip[ext]=$2; }

Can you give me a hint why you have used "^image" in your rule instead fileadmin?

@xerc
Copy link
Contributor

xerc commented Aug 27, 2024

thanks

Can you give me a hint why you have used "^image" in your rule instead fileadmin?

so only request for images are processes - might not be needed cause in _processed_ are only images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants