We are showing the featured image with the Bricks image element. But there has no placeholder image option and we are unable to display a fallback image if the featured image is missing. In this tutorial, I am showing you how you can display a fallback image.
Step 1: Upload a fallback image
At first, we shall upload a fallback/placeholder image via the WP media library.
1. Login to your dashboard
2. Navigate to Media -> Add New
3. Upload a placeholder image
4. Copy the image ID
Step 2: Setup Image Element
Open the Bricks builder editor, add the Image element, and set the dynamic data “Featured Image” as an image source.
Step 3: Display fallback image
Now we shall display the fallback image (which we already uploaded on the site) if a post has not a featured image.
2 comments
Francois Gonin
Hi there,
Thanks for this Tutorial.
Is it possible to share a snippet for a fallback image for custom term image which I set up with Meta Box (Single Image) ? different fallback image for different taxonomy type.
That would be great.
Thx in advance
François
bultimate
Which element are you using for image? Is it image element?