HubSpot Ideas

andrewv86

Automatic Resizing for .webp Images

Now that the latest versions of Safari, Chrome, Edge, and Firefox all have compatibility with the .webp image format, it would be really good to have automatic image resizing for that format so that we can remove the "Serve images in next-gen formats" warning on PageSpeed Insights.

20 Replies
flipflopflower3
Participant

And to further Andrew's idea, it would be great if HubSpot had a CDN that enabled us to serve WebP graphics by default to browsers that support it and automatically serve the original .jpg or .png to browsers that don't support WebP. WordPress can do this, but unless I'm mistaken HubSpot cannot.

Esther_ISM
Participant

Would be great! 

velliott
HubSpot Product Team

Hi all, 

 

I wanted to provide a quick clarification. Currently we automatically serve images in WebP format for browsers that support it (with a few exceptions, such as GIFs). If you are still seeing the recommendation in Google PageSpeed Insights to "serve images in next-gen formats" it is because the conversion happens server side and the file extension in the URL does not change. However, you should still see an improvement in performance because of the image conversion. You can learn more about this feature in our developer documentation here.

 

If this solution doesn't meet your needs, please don’t hesitate to share your feedback on this thread. It greatly helps us understand your needs so we can build a better HubSpot.

 

Thanks!

 

velliott
HubSpot Product Team
 
andrewv86
Participant | Platinum Partner

Hi Velliot,

Thank you for the clarification, that gives a lot of insight into how HubSpot manages images. It's good to know that you guys are staying on top of the game when it comes to web technologies.

The improvement in performance is always going to be a key part of how Google measures website optimisation, however (for SEO) if we are being ranked based on the kinds of image formats being used, then wouldn't it be important to make sure formats are exactly what they are? It would be nice if they are .webp images, that they are served with that extension.

More related to the issue, I'm hoping to use .webp images natively uploaded to the file manager instead. This works for the most part, however hubspot doesn't provide support for automatic image resizing for this image format. Is that something that we could potentially see in the future?

Cheers

Sjardo
Top Contributor | Elite Partner

Simply what  @andrewv86 says, we need to have it in the Source. 

 

  1. Upload image
  2. Create different image sizes
  3. Optimise 
  4. Convert to webp

 

cacosta
HubSpot Product Team

Thank you for the feedback everyone! Moving this to “in planning” as we are working on automatic image resizing for .webp images.

gshaw
Member

Does anyone have a good fix for this in the meantime? Really seeing my site suffer due to image size/mobile speed. Would love to know if you have any suggestions for a bandaid fix.  If that's mannually updating all the images to  .webp, what did you use to convert?

KMG2
Participant

Any update on this? I am still getting this issue in Page Speed Insights where the images and their file type is not webp. So that means that those images are not converted to webp format (not even in server side) right? Why some images are not converted to webp while some are? Any answer to this?

Sjardo
Top Contributor | Elite Partner

@KMG2 For now there is no update on this topic, besides uploading the webp images yourself.

 

I would like to say that you can achieve great PSI scores, even if this issue is still relevant. Yet, RUM scores are way more important!

 

Checkout the latest site i have developed with my team at Bureau Vet : https://www.rready.com/

We get a 100% score on desktop and a 95% score on mobile. (PSI)

 

Also our own site with a bunch of HS tracking, cta and images, gets a nice 100% score for desktop and 95% on mobile. (PSI)

 

Please let me know if you have any questions related to page speed 🙂 

 

Screenshot 2022-03-25 at 14.30.34.png

Screenshot 2022-03-25 at 14.26.03.png

KMG2
Participant

@Sjardo yea it seems like I have to upload webp images manually. What made me disappointed is that hubspot knowledge center claims that hubspot would handle image optimization in an efficient manner, but it doesn't which happened in my project and hence I will have to upload optimized webp format images on my own. Also there is no plugin or application that would handle this optimization automatically (like in Wordpress where there are plugins to handle this) if incase hubspot fails to optimize any images. Hope after this 'manual' image optimization, the page score would improve.

Sjardo
Top Contributor | Elite Partner

@KMG2 Sadly, what HubSpot says and does are two different things, thats why I do some experiments around these sorts of things.

 

WebP images are not by default better, smaller of faster. The HS Algorithm does a calculated check and decides if it has to transform the image. And still, when HubSpot optimizes an image for you , you can probably do it better yourself for the best results.

 

If you want full controle, i suggest using Cloudinary or an other third party where you can set a bunch of settings to get the maximum out of the images you try to (automaticly) optimize.

 

 

Sascha
Contributor

This thread confuses me. On the one hand, we have HubSpot say the feature was delivered in December 2020, then a few people say it's not really implemented, then HubSpot puts it back to "in planning" in January 2022 and then we heard nothing anymore since. 

 

What's the status quo with webp images?

 

Thanks

Sjardo
Top Contributor | Elite Partner

@Sascha 

 

In short the current status:

 

  • HubSpot converts images to WebP when WebP is smaller than it's original size.
  • Sometimes it does it wrong and you want to "overrule" this. 
  • You can still upload and serve a webp your own, so you can do everything yourself if you wish.

 

That for me, is the current status

Sascha
Contributor

Thank you @Sjardo - Someone in the thread mentioned that when uploading our own WebP images, the automatic resizing of images does not work. Is that still a thing? Do you happen to know?

 

bendonahower
Guide | Diamond Partner
Has not been an issue with me when uploading webp.
gsantos1
Contributor

Hi.

I'm having some inconsistencies with this and the support was not very helpful, so I think I will try my luck here.

 

Is resize_image_url required for automatic resize and automatic convertion of uploaded jpg/png to webp?

Because there are parts of the HubCMS documentation where it says any <img> tag with width and height would be converted, and this is not happening.

 

Does this convertion happens when loading an image uploaded on HubDB, on a dynamic page?

Image is loaded with <img>, has width and height declared, the resize happens for some images and others don't, all images still jpg/png.

 

Also, in all cases, Google Page Speed Insights says images are not optimized, "Serve images in next-gen formats".

Sjardo
Top Contributor | Elite Partner

Hi,

 

First I would like to make a mention about Google Page Speed. Even tho it's a great tool for testing and finding issues, it's not always the best for the site itself. PSI is focussed on best practices, but not always for each individual website. So always have a look to your own situation. If you really want to have a good look, use webpagetest.org. Way more information and even testing/experimenting options. Keep in mind that WebP is not always the smallest or best practice, and not even supported in older browsers.

 

That said, conversion to WebP is inconsistent and you do not have any grib on it. It's done dynamicly when loading (and before caching) a page and controlled by HS. If you want more grip on that process, upload WebP to the filemanager and load them into your website.

 

My solution is creating an snippet and build a custom image tag with different sizes, and preload them accordingly to speed things up. This way you have full control over the situation until HubSpot fixes the issues concerning the resize_image_url() function. 

 

 

 

 

bendonahower
Guide | Diamond Partner

@gsantos1 

 

HubSpot converts the image to webp on the server side not the source, which is where Google is looking.

 

We convert to webp before uploading to HubSpot using a tool called Filester (affiliate link:  https://filestar.com/#ref=bendonahower1) and there are other solutions if you have irregular needs to convert files, compress, resize, etc. if you search for them.

 

I 100% agree with @Sjardo about what's best but at the same time, if part of your marketing strategy is to make Google's search engine happy, this is how you check the "Serve images in next-gen formats" box.

gsantos1
Contributor

Thank you @bendonahower and @Sjardo 

Good stuff really.

 

I was a bit lost since some users said it was working, others don't, I thought I was doing something wrong, glad to know (but also sad) that there is something happening on the function.

 

I will work the img, srcset, etc until everything is fixed.

 

Thank you.