Home › Forums › Support › Fallback image for dynamic image This topic has 9 replies, 3 voices, and was last updated 2 years, 5 months ago by David. Viewing 10 posts - 1 through 10 (of 10 total) Author Posts October 5, 2022 at 7:30 am #2364042 Kees Hi, i have a generatpress element that i hook before the footer on a page. I have a dynamic image with ACF. How do i set a fallback image? I prefer not to use a background image. October 5, 2022 at 10:35 am #2364407 Jean Paiva Developer Hey Kees, If you is using the GenerateBlocks image block, you can use this filter to define a fallback image: add_filter( 'generateblocks_dynamic_image_fallback', function( $url ) { if ( ! $url ) { return 'https://picsum.photos/480'; } return $url; }, 10, 1 ); October 12, 2022 at 6:07 am #2370945 Kees Hi, This does not work. It does not show anything. Can you have another look? October 12, 2022 at 6:51 am #2370997 DavidStaff Customer Support Hi there, which method dud you use to add the Dynamic Background image ? Was it using the GP Elements method: https://docs.generatepress.com/article/dynamic-data/ October 12, 2022 at 6:53 am #2371000 Kees See video. Element with a hook and a custom field. October 12, 2022 at 7:19 am #2371034 DavidStaff Customer Support That link keeps returning: Sorry! Something went wrong on our end. Can you recheck the Loom file ? October 12, 2022 at 7:22 am #2371036 Kees And now? October 12, 2022 at 7:24 am #2371037 DavidStaff Customer Support Working now 🙂 Ok so instead of using the GP Dynamic Image Block. Can you use the GenerateBlocks Image Block and using its Dynamic options: https://docs.generateblocks.com/article/image-overview/#dynamic-data October 12, 2022 at 7:32 am #2371045 Kees Hi, That is not an option because i have a custom field with acf. And i cant select it there. October 12, 2022 at 7:39 am #2371051 DavidStaff Customer Support In the GB Image Block you can enable its Dynamic Data and set the Data Type to: Post Meta, then add your ACF name in the field provided. Author Posts Viewing 10 posts - 1 through 10 (of 10 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In