-
tinpeas
Hi Guys
I am having a bizarre issue where all the images on a site I am building have completely disappeared in the editor, they are fine on the front end.
I have tried removing CSS, deactivating plugins, removing functions, disabling elements, disabling the font library extension and attempting to add images again but nothing appears to work.
The only way I can get them to display is by switching themes from GeneratePress to Twenty Twenty-Five or similar.
I would appreciate it if you could take a look please as I am hitting a brick wall with this one.
Thanks in advance.
Cheers
Gary
-
George
Hi Gary,
I have just logged in to your site and all images are visible, for example I can see all images loaded when viewing the homepage in the block editor. Can you advise if I am missing something?
-
tinpeas
Just checked in Chrome and I can see them too, can you check in Safari please?
-
I can see the issue in Safari.
But I think it’s a Safari issue; it does not seem to show any images in the editor in PHP-based themes, including GP, Twenty Twenty-One, and Astra.
I recommend using Chrome instead.
-
tinpeas
It’s not a massive issue for me Ying, it just wasn’t like that until the latest update to GenerateBlocks. I know this because today I updated a local version to see what would happen and now that’s broken too.
-
Thanks for the info, I’ll check with the dev team 🙂
-
So the issue is caused by Woocommerce plugin; they added this CSS, which hides GB’s image in the editor:
.wp-block { content: ""; }Try this PHP snippet to override Woocommerce’s CSS:
add_filter( 'block_editor_settings_all', function( $editor_settings ) { $css = '.wp-block {content: unset;}'; $editor_settings['styles'][] = [ 'css' => $css ]; return $editor_settings; } );Adding PHP: https://docs.generatepress.com/article/adding-php/
-
tinpeas
Hi Ying
This worked great thank you, the weird thing is it does not effect all my WooCommerce sites.
Cheers
Gary
-
You are welcome 🙂
- You must be logged in to reply to this topic.