Home Forums Gutenberg Register block preview image with acf_register_block_type?


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?

  • +

    • sschat

    • January 30, 2020 at 9:30 pm

    Yes, i would like to “+1” this too.
    It would be a great addition to the ACF blocks.

    Now all blocks EXCEPT the ACF blocks have examples.

    • zkmark

    • February 2, 2020 at 7:17 am


  • Also looking forward to this ๐Ÿ™‚

  • + 1

  • +1 for this. Yes the โ€˜exampleโ€™ => [] works but just doesn’t render well with the html that doesn’t even try to make it responsive.

    Yes please for an image preview!

  • +1 – This would be awesome. We really need this for our projects.

  • +1

Viewing 9 posts - 1 through 9 (of 9 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.