Broken images on save in Gutenberg
-
This is something of a resurrection of a previous thread that is now closed: https://www.ads-software.com/support/topic/broken-images-78/
I have the “Rename on Post Save” option turned on, and I can confirm via the logs that this plugin is attempting to update the content/excerpts in the database after the post is saved, and when I check the front-end or refresh the editor the images are there.
However, since the plugin is changing the image URL in the database directly, the editor itself does not update unless you: 1) upload the image, 2) publish or save a draft, and 3) refresh the editor before proceeding. Otherwise, if you save again after the first time, the post content is overwritten with the old image URLs still present in the editor.
It’s taken me a little while to figure out this workflow, but forgetting means fixing several images per post, every post. I’m not sure there is a simple resolution to this unless this issue is ever resolved (which I doubt will happen, but who knows): https://github.com/WordPress/gutenberg/issues/12026
Since Gutenberg is an integral part of the WordPress experience now, I hope this plugin can get some updates geared towards Gutenberg. Another possibility would be renaming on upload by filtering
wp_insert_post
, so that the file would already be renamed when it’s inserted into the editor without needing any Gutenberg integration (maybe you’ve gone down that road and ran into issues, I don’t know).I don’t think this is a support question, since I think the only resolution for now is the workflow above, but I hope this might be fully resolved some day.
- The topic ‘Broken images on save in Gutenberg’ is closed to new replies.