How to prevent iframes / embeded content from loading until visitors agree to cookies

Home » Support » Docs » How to prevent iframes / embeded content from loading until visitors agree to cookies

Full Picture’s iframe blocking was designed to work with Gutenberg WordPress editor. If your site uses a different content editor please mind that image placeholder may not display as intended.

To block the iframe simply add a “shortcode” block with [fp_block settings] before your iframe/embed and add another one with [/fp_block] after your iframe/embed.

Next, replace the word “settings” from the first shortcode with one or more elements from the list below.

  1. stats="1" – indicates that the content requires consent for statistical cookies
  2. market="1" – require consent for marketing cookies
  3. pers="1" – require consent for personalisation cookies
  4. image="image url" – show an image placeholder until the iframe is loaded
  5. image="0" – do not show any image placeholder
  6. lazy="1" – load the iframe lazily
  7. width="1920" and height="1280" – specify iframe’s dimensions to make it responsive

In the end everything may look like this [fp_block stats="1" lazy="1" width="1920" height="1080"]...[/fp_block]

Other things you may want to know

If you want to display an image placeholder instead of an HTML iframe (not added via an embed) it will get the default aspect ratio of 16×9! If this is incorrect, you need to provide “width” and “height” settings (as shown above) to correct it.

Give the free version a try!