Support » Plugin: Adaptive Images for WordPress » can you make it work for subdomains?

  • my site’s images are served from a sub domain, but it appears as this plugin doesn’t work with that, so I am wondering can you make it work with subdomains?

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

    (@nevma)

    Hello, there,

    If your images are served from a subdomain, then this means that you are using a form of CDN that completely bypasses your WordPress installation when serving images. Unfortunately, this makes it technically impossible for our plugin to resize and serve your images because the image request never reach your WordPress installation (they are handled by your CDN).

    There is a case of CDN usage that we do support, however still in an experimental manner. but in order for it to work your CDN must be working as a “proxy” to your website. This means no subdomain for images.

    Let me know if you need any further information on the subject.

    Cheers,
    Takis

    Actually my subdomain’s folder is in the root folder of the wordpress installation. It goes like, html/imagefolder (for images), html/wp-content, and I created a subdomain of the main domain, and mapped that folder to the sub domain. Also, I noticed that the plugin states to mention folder where images are stored, I added the subdomain’s folder, but it still doesn’t work.

    • This reply was modified 2 years, 5 months ago by NUCUTA.
    Plugin Author Takis Bouyouris

    (@nevma)

    Hmmm, this seems a bit unusual. If your subdomain’s folder is the root folder of your WordPress installation, then what makes the difference? Who serves your images after all? Could please explain your setup a little more in detail?

    Cheers,
    Takis

    It serves from the subdomain, because when a site is loaded from multiple domains (and subdomains)it loads faster than through a single domain due to the way how browsers are developed. In Chrome as I read the maximum number of concurrent request is 6. If images are loaded from the same domain, it takes a while to load the resources, so I load the images from a subdomain to speed up the loading time. However, since the subdomains can be mapped with any folder, I left the subdomain’s folder in the root directory of the wordpress installation, and mapped it with the subdomain.

    In my nginx file in site-available folder, I stated as this

    server {
    root /var/www/html/cdn/;
    index index.php index.html index.htm;
    server_name cdn.nucuta.com;

    #Rest of the Codes……
    }

    As you can see here, the cdn folder (it’s actually not a cdn, but a name I just gave) in html folder where also the wordpress is installed is mapped with cdn.nucuta.com domain.

    • This reply was modified 2 years, 5 months ago by NUCUTA.
    Plugin Author Takis Bouyouris

    (@nevma)

    Okay, now I see what you have done here! Unfortunately, the subdomain that serves your images is different from your WordPress installation. Our plugin runs directly “in” your WordPress installation and filters the image requests in order to downsize them. But with your setup it is impossible for it to handle the images.

    If I may say so, it is true that each browser only allows a finite amount of concurrent connections from each domain, however I do not believe you are actually gaining much with your setup, because it is ultimately the same server serving all your data after all. I believe that you have a lot more to gain if you simply enforce all the other usual front-end techniques, like concatenating CSS files and putting them in the HEAD, concatenating Javascript files and putting them in the footer, etc, as well as keeping a more typical setup for consistency. What’s more, our plugin could reduce the download time of your images to a minimum, if you do chose a more typical setup.

    Of course, you will make the final choice and weigh the pros and cons of each technique!

    Cheers,
    Takis

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘can you make it work for subdomains?’ is closed to new replies.