App for Cloudflare® Pro

App for Cloudflare® Pro 1.10.0

  • Item seller Item seller Shawn
  • Featured

Issues with R2 When Editing Images

inklink

New member
The plugin works really great if you do nothing to the images, but if you try to edit an image (cropping, scaling, etc) via the Media Library, it ends up missing on the frontend.

We need the media library editing feature to work with R2. How do we do this?
 
It definitely is supposed to work (and it did before). However, it does look like WordPress may have changed something internally which is causing an error now. Still tracing it/tracking it down, but just so I know it's the same issue you are seeing, do you just end up with a spinning icon when you try to save an edit (never goes back to the media page)?
 
Yes, it basically just doesn't go anywhere and ends up never going to the media page. When you go to the media page though the image is missing.
 
Okay... so yes, same issue I was able to confirm.

It looks like WordPress made a change recently so if the filename of a media image is a URL, it attempts to do an HTTP PUT to the URL without authentication (honestly not sure WordPress devs would think that's a good idea since I can't imagine a scenario where any web server is going to allow a direct upload like that without authentication).

Working on making some changes that will intercept that HTTP PUT on the latest versions of WordPress. In the meantime, a workaround you could do is on the media image, click the Edit more details link. There, you have the ability to move an individual item back and forth between R2 and local. Not the long term way to do it, but until we get the HTTP PUT intercept fully built and tested, you could move an image from R2 to local, do the edits, then move it from local back to R2 (that should at least be a viable workaround that will work today).
 
okay thanks! will the fix be in an update?

or can you just let me know here that it's been fixed so i can let the users know they don't have to do the workaround anymore once you have the fix?
 
Back
Top