• johanvoets

    (@johanvoets)


    Hi team Delicious Brains,

    I’ve been running into a very peculiar issue since a few weeks now. If I keep the switch ‘Remove files from server’ on, it will result in a corrupt image and a 403 Forbidden error in my error.log

    Setup:
    – Cloudflare: s.mydomainname.nl
    – Amazon S3 bucket: s.mydomainname.nl with bucket policy as stated by Cloudflare, static website disabled.
    – Offload Media, setup with Cloudflare as CDN
    – Smush Pro for optimisation

    Steps:
    – Upload a new (hi-res) image
    – All different sizes (including the original) get smushed copied to S3
    – All sizes are removed from the server perfectly except for the orginal and the new “-scaled”-version that WordPress has generated for me.
    – That “scaled”-version is the new default size in the database, but when I copy the S3 link to that file, the image is corrupt (243b size, shows a blank square in the browser)
    – If i copy the link to the original image on S3, it’s available as well.
    – If i look at the error log of my server, it shows an XML-error, Acces Denied by Amazon. Apparently, there was an attempt to execute GetObject to ‘s3.amazonaws.com.s.mydomainname.nl/wp-content/uploads/2020/11/file.jpg’ – which also throws a 403 in the browser.

    If I disable the option to remove files from the server, the whole process works flawless. Except that I don’t want my server to fill up with images… ??

    I’ve been trying loads of things, including an extra statement to the bucket policy granting the IAM user for this job access as well, but to no avail.

    Any help would be largely appreciated!

    Cheers,

Viewing 1 replies (of 1 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    Sounds like there may be an issue with Smush Pro.

    Please ensure you’re on WP Offload Media 2.5.1 and the latest version of Smush Pro and test both together on your staging site.

    If the problem happens there, please test with Smush Pro deactivated.

    If the problem goes away with Smush Pro deactivated, please try their free version to see whether that also has a compatibility problem with WP Offload Media.

    If deactivating Smush Pro didn’t solve the problem when adding new large media to the Media Library, please post your diagnostic info.

    -IJ

Viewing 1 replies (of 1 total)
  • The topic ‘Forbidden (403) & corrupt image when removing original’ is closed to new replies.