Support » Plugin: Adaptive Images for WordPress » Need an Nginx expert

  • Resolved stonedb

    (@stonedb)


    Hey all,

    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takis Bouyouris

    (@nevma)

    Hello, my friend,

    Well actually the first option should do the trick, but you need to get the correct path there, the one that is correct as per the rest of your server configuration.

    Also could you share with us:

    1. The print debug in the plugin settings page
      • The print diagnostics in the plugin settings page
      • Your website url (if possible)

    Cheers,
    Takis

    stonedb

    (@stonedb)

    Hey Takis,

    have retry but don’t works.

    Here is my current nginx conf: https://pastebin.com/A2yCkqig

    Print debug: https://pastebin.com/7fWPY9J6
    Print diag: https://pastebin.com/mMuFQTJ4

    Can’t share url here (nsfw content)

    Thanks in advance

    stonedb

    (@stonedb)

    Finally issue resolved with nginx

    BUT still not working :/
    .

    When i go to https://sample.com/wp-content/uploads/2019/11/sample.jpg?debug=true

    it showing ‘You are viewing this page instead of the image you requested. This is part of the debugging capabilities of the Adaptive Images plugin. Seeing this means the plugin is running alright and that the .htaccess configuration file is setup correctly!’

    When i try to manually see a scaled image with https://sample.com/wp-content/uploads/2019/11/sample.jp?resolution=600,800 it showing the original image not resized

    And when i go to wp-content/cache/adaptive-images/ directory is empty.

    Here is my new conf: https://github.com/stonedb00/stonedb/blob/master/newnginxconf

    I hope someone can help me !

    Thanks

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello,

    Well if you went as far to see the debug message on an image request with the ?debug=true url parameter the most important part is done. The plugin is set up and works! Just for the record, what was the setting that made the difference?

    Now the reason you might not be seeing your images scaled can probably be caching. Do you have CDN or caching servers set up? In the case of a CDN things are a bit tricky, because they are intercepting image requests and handling them before your WordPress installation. We are trying to cover this issue but only a bit experimentally so far (see our plugin page description for more details on this). What you can do is try to enable the CDN support option in the plugin settings page which will cover most cases. What cannot be handled is the CDN serving your images from a subdomain, because there we have no access or authority.

    Cheers,
    Takis

    stonedb

    (@stonedb)

    NOW IT’S WORKS ! Thanks a lot for your time Takis !

    The issue was resolved, in fact in my nginx config i use:

    include rocket-nginx/default.conf;
    include snippets/phpmyadmin.conf;

    and these files conflicted with my configuration.

    Plugin Author Takis Bouyouris

    (@nevma)

    I am glad I was able to help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.