Quick tipGotchaContent Hub

hs cms upload skips .webp files, so theme images vanish without an error

I converted a theme's logos to WebP to save weight. The upload reported success and the logos were gone.

Subscription
Any portal that can host a coded theme
Permissions
Design Manager access; HubSpot CLI with a personal access key
Time
5 min · Intermediate
Last verified

Short answer

When I uploaded my own theme with hs cms upload, the .webp files were skipped and nothing failed loudly. HubSpot's CLI repository has an open issue saying the Design Manager does not accept WebP, while the Knowledge Base lists WebP as a supported type in the Files tool. So keep theme assets (including the preview image in theme.json) as JPEG, PNG or SVG, and upload WebP images to the File Manager, then reference them from module image fields.

1. What happened

I was building a theme for my own site. Before uploading, I resized the client logo files and converted 46 of them to WebP, which took the logo folder from about 1 MB to about 0.4 MB. hs cms upload finished and the theme validated. On the page, every logo was missing. The theme tree in the Design Manager had the folders but none of the WebP files.

Sam DSH theme folder tree in the Design Manager with css, fonts, images, js, modules and templates folders
The uploaded theme tree. Check the images folder (1) after every upload that adds new file types.

2. Why

An issue on HubSpot's CLI repository reports that the Design Manager does not accept WebP. HubSpot's supported file types article lists WebP as an image type for the Files tool, which is a different store. The CLI skips what the Design Manager will not take, so the upload looks clean. I confirmed it the plain way: the files were in my local folder and not in the Design Manager.

3. Where to put WebP instead

  • Theme assets (icons, background art, the theme preview image): JPEG, PNG or SVG. My theme.json points screenshot_path at a JPEG for this reason.
  • Content images (logos, photos editors swap): upload to the File Manager and pick them in an image field on the module. That is where my client logos ended up. They are customer data, not theme files, so the logo wall ships empty and editors add logos per page.
theme.json open in the Design Manager with the screenshot_path line pointing at a JPEG
theme.json in the Design Manager. The preview image path (1) points at a JPEG.

4. A quick check after upload

# any WebP still referenced by the theme?
grep -rn "\.webp" my-theme/templates my-theme/modules my-theme/css

For other upload surprises, see theme upload validation errors.

Sources

New field notes by email

One email when a new article publishes.

Still stuck?

If this did not fix it, the problem is probably specific to your setup. Book a call and we will look at it together.

Book a call with Sam