Support

Account

Home Forums Gutenberg Register block preview image with acf_register_block_type?

Unread

Register block preview image with acf_register_block_type?

    • rps

    • November 20, 2019 at 6:48 pm

    In WordPress 5.3 you can now see a preview image for the core Gutenberg blocks when you hover over their icons in the top left add block popup. It would be great to be able to set a static image for custom blocks registered with acf_register_block_type. If I add ‘example’ => [] to the block attributes, it will try to generate a preview from my block output via an ajax call, but it’s not super pretty since we have heavy use of animations, SVG’s and other funky layouts on the front-end. Has anyone figured out a way to use static images for these previews?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.