• Resolved TwanVermeulen

    (@twanvermeulen)


    Hi devs!

    I have enabled the media storage cdn functionality in your plugin.
    It works well for my public facing pages. All HTML contains the new CDN URL.
    In the media gallery it works the same.

    I do unfortunately still see references to the local storage (wp-content/uploads) while editing posts in the admin area. So all images that have been added in the past that are shown in the WYSIWYG editor of the post content. Since I don’t have the attachments stored locally, they are all not found at the moment.

    Would it be an option to also update these URLs? That would make my day :=)

    Please let me know if you need any more information.

    Thanks in advance,

    Twan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @twanvermeulen

    Thank you for your inquiry and I am happy to assist you with this.
    I am not quite sure I understand the issue you are describing.

    Since I don’t have the attachments stored locally, they are all not found at the moment.

    Can you please explain what you mean by this? Have you deleted the images from wp-content/uploads after uploading them to CDN?
    Can you also please share the URL of your website and possibly the screenshot of the issue you are referring to?
    Thanks!

    Thread Starter TwanVermeulen

    (@twanvermeulen)

    Hi @vmarko ,

    I have 2 use cases where this situation is inconvenient:

    Use case 1:
    I run a copy of a production db on my local machine, with renamed domains.
    The media size is quite big so I would like to see the images to be loaded from the CDN, instead of my local environment.

    Use case 2:
    I want to load balance the traffic. In that case I want the uploads to be available on every server, even when the images are not stored on each server. They are all stored on the CDN however. I can use a shared storage, but if all URLs point to the CDN location, that will not be necessary.

    Here you can see a print screen of the issue:
    https://imgur.com/IlLeurl

    Instead of seeing a path to the wp-content directory, I would like to see the CDN URL.

    This is a production page, where the images are loaded from the CDN:
    https://www.homedeal.nl/dakkapel/dakkapel-schuin-dak/

    Also, when I visit a wp post while being logged in, I see the local paths instead of the CDN urls.

    I hope that the issue is more clear now.
    I’m happy to help if more details are required.

    Best regards,

    Twan

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @twanvermeulen

    Thank you for the information.
    A quick question. have you actually deleted that image from wp-content/uploads/?
    We make sure they are uploaded to the CDN and loaded from the CDN. So once media library files were uploaded to the CDN, they should not be deleted from the origin to avoid issues like 404.
    Can you please check your CDN settings and see if the option Use CDN links for the Media Library on admin pages is enabled and if the CDN is disabled for any user roles?
    Thanks!

    Thread Starter TwanVermeulen

    (@twanvermeulen)

    Hi @vmarko ,

    I indeed don’t have the images in wp-content/uploads. But they exist on the CDN.
    So if they are loaded from the CDN it will not return a 404.

    Use CDN links for the Media Library on admin page – Yes I have it checked.
    I do see CDN urls when I open the media library. Images are visible there, even when they are not stored in wp-content/uploads.

    The only issue is the editor in the post content. That’s the only place where I still see links that point to wp-content/uploads

    I did disable the CDN for some roles yet. That was a mistake. Now I turned it off.
    That solves this issue:
    Also, when I visit a wp post while being logged in, I see the local paths instead of the CDN urls.

    So the only issue left is that I don’t see the CDN urls while editing a post/category.
    Would that be possible?

    W3TC is doing some url replacement to apply the CDN URLs, right? It would be nice if that filter can also be applied here.

    Or do you say that is mandatory to have the images available in wp-content?

    Best regards,

    Twan

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @twanvermeulen

    Thank you for the information.
    When editing the post/category it is showing the original link so W3 Total Cache cannot replace that.
    I would always keep images available in wp-content. When they are being served from the CDN, they are not causing any server load. However, if something happens with the CDN you should have a backup in wp-content. It’s only a matter of “what if?”
    So it’s not mandatory but it’s the usual practice to keep the images simply to avoid issues when there is an issue with the CDN.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CDN URL not shown in wp-admin/post’ is closed to new replies.