Request smaller featured image sizes from CMS Blog Post APISOLVE
2 weeks ago - last edited 2 weeks ago
We have a Wordpress site with a Hubspot blog. We've created a hubspot blog post importer plugin on the Wordpress site to output blog cards on the website's homepage here: https://www.incourage.com/#from-the-blog
The plugin relies on the get blog posts method of the hubspot blog API https://developers.hubspot.com/docs/methods/blogv2/get_blog_posts
Currently, it pulls the raw uploaded image before any compression. So if an admin adds 10MB images, we end up with 60MB in download requests.
You can see the waterfall of those requests here where hubspot cdn is adding 40 seconds of load time to the page here:
When I load an image directly on the blog, I can add ?width=500 to generate a cached, smaller version of the image. I can make this image 500px wide:
But with hubspot cdn, this doesn't work, I cannot make this image 500px wide:
I can not find anything in the above docs about requesting image dimensions or sizes. Am I missing something? Any advice would be greatly appreciated!
Solved! Go to Solution.