WP Smush
[resolved] Images hosted on subdomain (7 posts)

  1. Bobby
    Posted 1 year ago #


    There are several threads addressing this issue that have been marked as resolved, when they are clearly not.

    WP Smush it is all about reducing image file size so your pages load faster, as suggested by Google and Yslow etc. Serving images from a subdomain also allows for faster file download.

    Since the update to this plugin from 1.6.5 to, the ability to smush images that are in fact in the worpdress directory, but served from a subdomain is no longer possible.

    For example, WordPress recognises the images in the media library and the content is in fact in wp-content/uploads, even though the Settings in Setting > Media > Full URL path to files links to a subdomain, i.e. http://images.website.com

    So, for those that are looking for a solution until this is actually fixed, roll back to 1.6.5 by downloading here. I rolled back and I'm now serving images from a subdomain that have been smushed. Including Bulk Smush.



  2. @Bobby,

    While I'm not going to argue the point on the concept of serving images, css, js from a sub-domain.

    The reason for removing this support from Smush.it was effecting many other user who are using Content Delivery Networks (CDN). This issue was causing an issue in that Smush.it was run against the local copy of the image but the real image on the CDN was not updating. The Smush.it plugin does not have the ability to update remote images. Only those in the site's wp-content/uploads folder.

    Specific to your setup assume your home URL is http://www.website.com and you serve your images via http://images.website.com for your setup you may be simply pointing back to the same exact image. But the Smush.it plugin cannot determine this from the server. All it knows it the image has a different URL than the home URL. Sure, the Smush.it plugin could attempt to lookup the sub-domain to determine if it was the same IP address as the home URL. But this still does not tell the plugin it is the same exact image. The sub-domain could be pointing to a copy of the image in a different folder on the server.

    Will continue to look into this and see if we can come up with a solution which will work for all configurations. Thanks.

  3. Bobby
    Posted 1 year ago #

    The Smush.it plugin does not have the ability to update remote images. Only those in the site's wp-content/uploads folder.

    The images are in that exact folder, wp-content/uploads. The Full URL simply points to the subdomain when displaying images on the front end to the user.

  4. @Bobby,

    I'm trying to get one of my development sites setup so I can see if there is a way to somehow use the local image. Can you provide some details on your sub-domain setup?

  5. Bobby
    Posted 1 year ago #

    I have a subdomain setup in my cpanel. For example: http://images.website.com/ - the document root for this subdomain is: /public_html/website/dev/wp-content/uploads

    I am using a plugin to bring back the original media path box in the Media Settings page, you can find this plugin here.

    Then in that Media Settings page I have set the "Store uploads in this folder" to : "wp-content/uploads"

    Then in the "Full URL path to files" I have my subdomain: "http://images.website.com"

    Hope this helps.

  6. @Bobby,

    Please update to WP Smush.it which includes support for turning off the URL match logic. Check under Settings > Media you will see a new option under Smush.it to disable the URL check.

  7. Bobby
    Posted 1 year ago #

    This fix does appear to have solved the issue so it can NOW be marked as resolved. However, I think this kind of setting should be able to be built in to be automatically detected.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Smush
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.