https://discord.gg/botpress logo
🆘 Need help: CSS not resizing images in Botpress ...
# 🤝help
b
I’m using Botpress Cloud V3 and have the chat embedded in Wix. The images inside my Image Cards are suddenly huge, and none of my Custom CSS in Webchat → Appearance → Custom CSS has any effect. A few weeks ago they were perfectly sized — this started after I exported and reimported the bot several times. I’ve tried: • .bpw-card img, .bpw-card-image selectors • max-width, max-height, and !important • Republish + clear cache No change. Did Botpress switch how it renders images (like to background-image) or rename the card classes in V3? Thanks 🙏 any insight appreciated!
l
Hello @bored-camera-99886 🙂 What changed since it was working? Did you update a certain integration or something ?
b
Hey 👋 thanks for replying! Nothing in my integrations changed — the only thing I did was export and reimport my bot several times. Ever since then, my Custom CSS in Webchat → Appearance stopped taking effect. Each time I reimport, I also have to delete and reupload my images, because the old ones stop syncing or displaying correctly for some reason. These are the exact same images that were perfectly sized before — now they appear oversized, and none of my CSS adjustments affect them. I confirmed: The embed code and client ID are correct. The image class is bpMessageBlocksImageImage. The CSS publishes successfully, but doesn’t load inside the live iframe (DevTools shows no custom rules). So it looks like the theme or appearance link breaks after reimport. Is there a way to force the webchat to recompile or reattach the Custom CSS to this bot instance?
l
Have you tried this on a different workspace / browser?
b
Yes I have. Chrome and Firefox - both incognito mode - always. The image is basically the same size as the entire frame. No issues when I uploaded the same image like 2 weeks ago. Same everything. Except for reimporting the same bot.
Can you try using maybe an older version that was working?
I would copy / export your bot just in case!
b
Appreciate the assistance! I've been working on this bot for like 4 weeks and publish in the 10s each day. I can't tell you the version where it was working.
Update: I checked deeper and confirmed the issue — the webchat isn’t loading any theme CSS at all. The Custom CSS in Webchat → Theme saves fine, but no theme-xxxx.css file from cdn.botpress.cloud ever loads, so the styles never apply. This seems to have happened after I exported and reimported my bot several times, which likely broke the theme link between the current client ID and the live embed. I’m testing a workaround by adding my stylesheet manually with additionalStylesheetUrl in the embed, but it’d be great to know if there’s a proper way to rebuild or reattach the missing theme CSS.
l
Interesting, ill see If I can get anyone to take a look!
In the mean time can you drop some screenshots?
b
Appreciate it your assistance. I’m using Image Cards in my Botpress webchat, embedded inside Wix. On mobile, they display fine. On desktop, they blow up to full size (≈465×665 px) and overflow the chat window. In DevTools, the element shows: src: hosted on files.bpcontent.cloud (confirmed working) Inline dimensions: width: 465px; height: 665px No CSS rules like max-width: 100% or height: auto No active theme stylesheet in the Styles or Network tab A 403 resource error in Console, likely the blocked stylesheet or favicon inside the iframe That suggests the theme CSS isn’t loading at all inside Wix’s sandboxed iframe, so the webchat displays the raw, unscaled image. When I open the same iframe URL directly in a new tab, the image scales correctly and the theme stylesheet loads normally. So it looks like the Image Card renderer doesn’t enforce responsive sizing (max-width: 100%) when the theme CSS fails to load. Could you confirm whether the Image Card is meant to handle scaling natively inside the iframe, or if it fully depends on the theme CSS for that behavior?
I have 6 images in total in the bot. ALL render the same, regardless of dimension size upload.
Thank you for any assistance.
3 Views