• Resolved Terence Milbourn

    (@pubdirltd)


    I am trying to use Smushit on a single site in a WP multisite network. The images are all in one media folder, not dated folders, and all URLs ~ which work fine for everything else ~ are all root-relative.

    Here’s what I see when I run Smushit…

    Processing placeholder…
    — [original] 640 x 480: ERROR: /wp-content/uploads/placeholder11.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [thumbnail] 150 x 150: ERROR: /wp-content/uploads/placeholder11-150x150.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [medium] 300 x 225: ERROR: /wp-content/uploads/placeholder11-300x225.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [shop_thumbnail] 90 x 90: ERROR: /wp-content/uploads/placeholder11-90x90.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [shop_catalog] 150 x 150: ERROR: /wp-content/uploads/placeholder11-150x150.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [shop_single] 300 x 300: ERROR: /wp-content/uploads/placeholder11-300x300.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [half-width-thumb] 575 x 431: ERROR: /wp-content/uploads/placeholder11-575x431.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [portfolio-thumb] 600 x 450: ERROR: /wp-content/uploads/placeholder11-600x450.jpg must be within the website home URL (http://electionpartner.co.uk)
    — [portfolio-thumb-masonry] 600 x 480: ERROR: /wp-content/uploads/placeholder11-600x480.jpg must be within the website home URL (http://electionpartner.co.uk)

    Surely it should be able to handle root-relative URLs correctly?

    https://wordpress.org/plugins/wp-smushit/

Viewing 8 replies - 1 through 8 (of 8 total)
  • David

    (@ugotsta)

    Hi @terence, hope you’re well today! 🙂

    That should work, yes. Could I ask how you’ve setup that url structure?

    Have you changed your wp-config.php file like so?
    http://codex.wordpress.org/Editing_wp-config.php#Moving_uploads_folder

    Also, you do have the “Organize my uploads into month- and year-based folders” option unticked at Settings > Media, correct?

    David

    (@ugotsta)

    Hi @terence, second thought, since you mentioned Multisite, are you using a method like that noted in the following?
    http://www.bappi-d-great.com/wordpress-multisite-how-to-define-a-common-upload-folder-for-all-blogs-or-subsites/

    Just wanted to be sure we have all the details behind your configuration. 🙂

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Hi David,

    Thanks for coming back to me.

    Nope, I don’t have a common folder for all sites, just don’t organise uploads by day and month, that’s all. They are all in a single folder.

    I have modified my multisite wp-config.php as follows…

    define('WP_CONTENT_URL', '/wp-content');

    In the codex it says you need a fully qualified URL but I have found for everything except this one thing, root-relative works just fine.

    Terence.

    David

    (@ugotsta)

    Hi @terence,

    Hope you’re well today! 🙂

    Thanks for clarifying that. Is there a reason you’re not using a full URL there?

    Is it possible for you to do so and then test the smush process with that?

    It sounds to me like that would sort it and wouldn’t have any negative consequences, besides that being the advised way.

    Could you let us know?

    Thanks!

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Hi David,

    The reason I did that was because its on a development site on .dev domain and I’m going to have to move to production site on a .co.uk domain, so I was simply trying to keep it all root relative.

    Using a full URL would void that of course, even if temporary.

    Terence.

    Jack K

    (@jack-kitterhing)

    Hi there Terence,

    Hope you’re well today and sorry about the delay here.

    Did you get this working? Would it be possible to test with the full URL please just to make sure?

    Can you enable Smush.it debug mode please and let me know what it outputs?

    Thanks!

    Kind Regards
    Jack.

    Thread Starter Terence Milbourn

    (@pubdirltd)

    Hi Jack. Nope, not possible, but I am working with the theme developer at the moment, in which the particular element is generated. The production site is all root-relative too. Over 93% of the top 100 websites (according to Alexa) use root relative urls. Including Wordpres.org, WordPress.com, Facebook.com, Twitter.com, Google.com, Wikipedia.org, Yahoo.com, Youtube.com, Amazon.com, Fickr.com etc. So I want to stick with this and see it through.

    David

    (@ugotsta)

    Hi @terence,

    Thanks for your reply! By any chance, have you tried going to Settings > Media and unsetting the “Enforce image URL is same as Home” option there?

    Perhaps that may work for you?

    Cheers,
    David

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Doesn't work with root-relative URLs’ is closed to new replies.