Plugin Author
ulfben
(@ulfben)
WordPress 5.x is doing something funky with uploads if you’re using the Gutenberg editor. My plugin filters on ‘upload_dir’, and all uploads should pass through there. But the Gutenberg blocks “Image” and “Gallery” either bypass that filter, or doesn’t provide the $post context.
There is a workaround: when creating a “Image” or “Gallery”-block, don’t use the upload-button! Instead click on the “Media Library” button and upload your files there. Their paths will be correct.
I don’t know if I’ll ever have the time to dive into WP and figure out why this happens (perhaps there is a new filter we should be using to modify ‘upload_dir’?). If you or anyone else can clue me in I’d be more than happy to patch the plugin.
-
This reply was modified 6 years, 11 months ago by
ulfben.
Plugin Author
ulfben
(@ulfben)
Figured out a workaround and updated the plugin. It should work with the Gutenberg blocks now. Just make sure you’ve named- and saved the post before attempting any uploads.
Thread Starter
Jabe
(@jabe)
Hi! Thanks a lot for this fast answer and fix!
It’s perfectly working again. I added 5 stars review.