CMS Development

Ntbrown
Contributor

What's up with the CLI not uploading progressive image formats and other files?

SOLVE

WEBP, AVIF, etc. As well as other common file formats. XML, etc.

 

Unrelated, but should also probably make preview / screenshots JSON configurable for progressive formatting 😉

0 Upvotes
1 Accepted solution
stefen
Solution
Key Advisor | Partner
Key Advisor | Partner

What's up with the CLI not uploading progressive image formats and other files?

SOLVE

@Ntbrown I'd recommend posting your thoughts to the Ideas board to get more HubSpot eyes on this and for others to upvote 

Stefen Phelps, Community Champion, Kelp Web Developer

View solution in original post

4 Replies 4
MHennessie
Participant | Platinum Partner
Participant | Platinum Partner

What's up with the CLI not uploading progressive image formats and other files?

SOLVE

Just ran into this issue as well with a HubSpot theme I am developing where I convert images to webp using webpack and realized none of them were being uploaded when I tried to reference them in the template/module files. Weird for it to just ignore them, no error or anything.

0 Upvotes
Ntbrown
Contributor

What's up with the CLI not uploading progressive image formats and other files?

SOLVE

@stefenThanks for the reply. I'm aware of HubSpots conversion to webp. To my knowledge... really it's just CloudFlare under the hood that does the conversions, is the real CDN, and does HubSpots image resizing via a limited exposure of their API.

Under that presumption.... And the seemingly supporting request headers the image API is essentially "see if X can be resized within restricted criteria" if it can send it off to CloudFlare behind the scenes with parameters, if webp can be served do that, but that's insufficient by modern standards.

If a CDN is to be used in this manner cloudinary and more modern variants are miles better. And it'd be a significant advancement if hubspot were to expose either a greater option set or piping through other cdns.

 

Not to mention the conflicts of interest as stated in their docs by auto resizing 300dpi etc which does have valid use cases.

I agree a supported list would be very nice to have although I'd say it's pointless limiting them in the first place and a flawed methodology.

Even as support grows it's still problematic as those files still don't process theme variables. E.g. - JSON.

stefen
Solution
Key Advisor | Partner
Key Advisor | Partner

What's up with the CLI not uploading progressive image formats and other files?

SOLVE

@Ntbrown I'd recommend posting your thoughts to the Ideas board to get more HubSpot eyes on this and for others to upvote 

Stefen Phelps, Community Champion, Kelp Web Developer
stefen
Key Advisor | Partner
Key Advisor | Partner

What's up with the CLI not uploading progressive image formats and other files?

SOLVE

@Ntbrown I believe HubSpot's CDN will automatically deliver WEBP files if it detects the browser can support it. More info here: https://developers.hubspot.com/docs/cms/developer-reference/cdn

 

That doesn't solve the problem with your other files. I've noticed they are slowly adding more file types such as Markdown as they see demand for them. A list of all the supported file types would be a nice thing to add to the documentation for sure.

Stefen Phelps, Community Champion, Kelp Web Developer