• The cover image on a site I manage keeps getting re-written when it isn’t being edited. If you edit anything on the page, save it and then view the page a line of html gets changes. The image urls have been replaced and do not work for this post.

    This is the correct html:
    <div class="wp-block-cover has-background-dim" style="background-image:url(https://placeholder.com/wp-content/uploads/EventsBG-scaled.jpg)"><div class="wp-block-cover__inner-container"><!-- wp:columns --><div class="wp-block-columns">

    This is what it gets re-written to:
    <div class="wp-block-cover has-background-dim"><img class="wp-block-cover__image-background wp-image-170" alt="" src="https://placeholder.com/wp-content/uploads/EventsBG-scaled.jpg" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:columns --><div class="wp-block-columns">

    • This topic was modified 5 years, 3 months ago by michaelimi.
    • This topic was modified 5 years, 3 months ago by michaelimi.
    • This topic was modified 5 years, 3 months ago by michaelimi.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Gutenberg editor rewrites HTML on save’ is closed to new replies.