Use the image optimization URL/endpoint in Velo

Question:

I have high-quality images in my media gallery for use on item detail pages, as expected.

For example:
https://static.wixstatic.com/media/f7bd70_5d1cd7bee8f54bfa87a602d90efd1441~mv2.png

However, I have hundreds of these images, and I don’t want to download each high-quality image while listing the item in a repeater. Ideally, images of 2MB or more should not be downloaded.

Is there an optimization endpoint I can use, something like:

https://images.wix.com?image=https://static.wixstatic.com/media/f7bd70_5d1cd7bee8f54bfa87a602d90efd1441~mv2.png&resize=300x300

This way, users will download a resized version of the high-quality images.

Product:
Wix Editor

What are you trying to achieve:
I have high-quality images in my media gallery, and I want to used optimized versions in my repeater.

What have you already tried:
I am planning to resize images myself if there is no solution.

Additional information:
[Include any other pertinent details or information that might be helpful for people to know when trying to answer your question.]

Certainly!

Here’s how you can do it:

1 Like

This worked amazing!
Can I learn if this is a native wix solution or a 3rd party app is doing it?
Just want to make sure on stability of preztech.

Thanks!

It is very much a native solution that Wix offers. I have just created this example to show how it works in a more user friendly way (:

When you click on Optimize, you will get the optimized URL, which is made up like this:

Image URL: https://static.wixstatic.com/media/1501be_9ff34c8855504da1a7febbcef935a312~mv2.jpeg

Optimized URL: https://static.wixstatic.com/media/1501be_9ff34c8855504da1a7febbcef935a312~mv2.jpeg/v1/mode/w_width,h_height/imageId

Where
mode can be either fit or fill,
height in pixels, for eg 750
width in pixels, for eg 500
and imageId, which in this case is 1501be_9ff34c8855504da1a7febbcef935a312~mv2.jpeg