Hi @Norm, I’ve discovered a significant issue when using images inside Flexbox containers (e.g., centered columns) and how Blocs handles custom classes during export. It’s actually a combination of two problems.
- The Initial Problem: Images stuck at Large (LG) dimensions on Medium (MD) screens
In my layout, I have a row with 3 columns. On Desktop (LG), the images scale perfectly to fit the 1/3 column width. However, when switching to Medium (MD) breakpoints—where the columns stack vertically and should span the full width (12 columns)—the images remained “stuck” at their small Desktop dimensions. They refused to expand to the full width of the MD container, leaving them centered but too small, even though they should have scaled up to fill the 100% width of the stacked column. This happened across all browsers (Safari, Chrome, Firefox).
Crucial Observation: This issue only occurs on the exported live website (on the server). Inside the Blocs environment, the Blocs Preview, and even the “Preview in Browser” function from within Blocs, everything looks perfectly fine. The layout only breaks after a full export.
- The Required CSS Fix: To force the browser to respect the container width and override the fixed HTML attributes, I needed a custom class, because the standard Bootstrap class …
.img-fluid {
max-width: 100%;
height: auto;
}
… was no longer doing what it was supposed to do. So the following CSS fixed the problem for me…
.custom-img-fluid {
width: 100% !important;
max-width: 100% !important;
height: auto !important;
display: block !important; /* to fix inline-block issues within flex containers */
}
- The “Naming Bug” in Blocs Export. This is where it gets strange: When I named this class
.img-fluid-custom, Blocs seemed to treat it as a duplicate or a variant of the standard Bootstrap.img-fluidclass during export.
The Result: The custom class was stripped from the<img>tag in the exported HTML or replaced by a doubleimg-fluidentry. Consequently, my custom CSS rules never reached the browser.
The Fix: Simply renaming the class to.custom-img-fluid(changing the prefix) solved the issue immediately. Blocs now recognizes it as a unique class and exports it correctly.
Conclusion: It seems there is an internal “prefix-matching” or “optimization” logic during export that “swallows” custom classes if they start with e.g. img-fluid.
I thought I’d post this on the forum (rather than as a bug report) since I’ve already found a solution for myself. Maybe it will be helpful to others, too.


vs. how it should be:
…