Browser: Firefox 115.18.0esr
OS: macOS
OS: Latest( Version 6.7.1)
URL: Local
screenshot:
Description:
Hi everyone,
I’m encountering an issue with custom breakpoints in Bricks Builder when working with the “Image” element and responsive image sources.
Problem:
I’ve added an image for the desktop by default and then included two responsive sources:
- 360px (a custom breakpoint)
- 478px (a predefined breakpoint)
However, in the generated HTML, there’s no <source>
tag for the custom breakpoint (360px). This causes the image for 478px to be displayed instead when viewing the page on devices with a width of 360px or smaller.
Here’s the HTML code that gets generated:
<picture id="brxe-ngpvzg" class="brxe-image clouds-images tag">
<source media="(max-width: 478px)" srcset="https://icom2025.local/abada/wp-content/uploads/cloud3-478.png" type="image/png">
<img src="https://icom2025.local/abada/wp-content/uploads/cloud3.png" class="css-filter size-full" alt="nuages" decoding="async" data-type="string" width="500" height="238">
</picture>
The <source>
tag for (max-width: 360px)
is missing, even though the breakpoint and image source are configured in the builder.
Tests Conducted:
- With Predefined Breakpoints: Everything works as expected. The
<source>
tags are correctly generated for each breakpoint. - With Custom Breakpoints: The issue occurs only when using custom breakpoints, even though they are defined in the global settings.
Steps to Reproduce:
- Add a custom breakpoint (360px) in the Bricks Builder global settings.
- Use the “Image” element and set a default image.
- Add sources for the custom breakpoint (360px) and a predefined breakpoint (e.g., 478px).
- Check the generated HTML on the frontend.
Expected Behavior:
The <source>
tag for the custom breakpoint (360px) should be generated as:
<source media="(max-width: 360px)" srcset="https://icom2025.local/abada/wp-content/uploads/cloud3-360.png" type="image/png">
Actual Behavior:
The <source>
tag for the custom breakpoint is missing entirely, causing the fallback image for 478px to be displayed instead.
Questions:
- Is this a bug in how Bricks handles custom breakpoints in the “Image” element?
- Is there a workaround to force the
<source>
tag to be generated for custom breakpoints?
Thank you for your help!