• Resolved Danny Santoro

    (@danielsantoro)


    Automattic Happiness Engineer

    Hi there,

    I have a subfolder multisite set up, so sites are like so:

    
    example.com
    example.com/product-a/
    example.com/product-b/
    

    I have configured W3 Total Cache to set at the network level, and I am only using W3 Total Cache to send images to an S3 bucket which is then served over CloudFront.

    Let’s say I’m working on Product B and am writing an article – I’ll upload an image. This properly sends the image to the S3 bucket so it is accessible at example.com/wp-content/uploads/sites/03/2022/09/someimage.jpg from the S3 bucket. However, the post editor is trying to display example.com/product-b/wp-content/uploads/sites/03/2022/09/someimage.jpg, and the blog slug in the URL returns a broken image.

    I have a stock standard .htaccess file for a multisite and other than this issue, everything is running smoothly. Is there a way to force the editor to display the CDN images like the “Use CDN links for the Media Library on admin pages” option?

    Thank you!

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

    (@vmarko)

    Hello @danielsantoro

    Thank you for reaching out and I am happy to assist you with this.
    Can you please confirm you are using a single configuration for all sites option in Performance>General>Settings>Miscallenaous?
    The “Use CDN links for the Media Library on admin pages” option replaces the original URL with the CDN URL for example instead of:
    https://example.com/wp-content/uploads/sites/03/2022/09/someimage.jpg
    is replaced with
    https://something.cloudfront/wp-content/uploads/sites/03/2022/09/someimage.jpg
    If you are using a single configuration for all sites, you can try disabling this option and using the Specific settings for each subsite CDN option in Perofrmance>General settings>CDN.
    You can also try Modify attachment URLs option. In Performance>CDN, just above the Genearl box there is a number of buttons, and one of them is Modify attachment URLs. YYou can add your main domain example.com without the /product-b/

    Let me know if this helps!

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Images do not display in post editor with CloudFront and Multisite’ is closed to new replies.