Image Resizing

adgj Jan 31, 2014 07:19AM PST

I see ir0.mobify.com added to the src of the images when I use Image Resizing API. I want to how to test if re-sizing is actually working. Can I use chrome's webinspector or chrome's emulate tool to test? When I debug through web inspector I don't see <format><quality>/<maximum width>/<maximum height> parameters append to the url. How do I know if the API is working>?

Up -1 rated Down
Jennifer Jan 31, 2014 01:25PM PST Mobify Agent

Hello,

Checking the image src in web inspector is a good way to check if the API is working. Do you know which version of the API you are using?

If you are using 1.1 (documentation here), then you will need to pass an object to the resizeImages function that specifies what options should be used for the image. That would look something like this:

var irOptions = {
maxWidth: 200,
format: ‘jpg’,
quality: 90
};

$(‘img.my-img’).resizeImages(irOptions);

It would produce images with the following src: "//ir0.mobify.com/my-project/jpg90/200/<Original-img-src>

Hope that helps,
Jennifer

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
support@mobify.me
https://cdn.desk.com/
mobify
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
Invalid characters found
/customer/en/portal/articles/autocomplete