Hi all,
i’m running a wordpress website on nginx, all working like a charm except with one of my plugin = Adaptive Images for WordPress. (This plugin serve scaled image).
The owner of this plugin said that, add this to location but it’s don’t works.
location / {
rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;
}
Have also tried this:
location ~ /wp-content/(themes|uploads) {
rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;
}
and this:
location ~ /wp-content/(themes|uploads) {
rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;
}
Nothing worked!
Here is my nginx config: https://github.com/stonedb00/stonedb/blob/master/nginxconf
So i need an nginx expert to give me the correct rewrite config and resolve it !
Thanks in advance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @StoneDB,
This might prove to be a bit trial and error however you should try using it under the location describing your images
location ~* .(js|css|png|jpg|jpeg|gif|ico)$ {
expires 60d;
log_not_found off;
}
After all, this plugin is for scaling images.
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.