Direct implementation using the Cloudimage URL API
If your Web application does not use a CMS (Wordpress, Drupal, ...), e-commerce platform (Prestashop, Magento, ...), or development framework (React, Angular, Django, ...), then you need to adapt your image URLs in your HTML <img> tags.
Basic usage
For example, if your origin image is available at the following URL::
You need to define the image size with operations1 and operations2 to deliver the lightest possible image. If you want Cloudimage to do the job for you and define the optimal size based on your container width, then look at our JS lib, React, and Angular plugins.
Url-encoding resource URL
ci_url_encoded=1
If a resource is versioned or dynamically generated using query strings, or the filename contains unsupported or reserved characters, you will need to url-encode the URL of the resource. In this case, you need to add the ci_url_encoded=1 parameter to the Cloudimage URL.
For example, in the origin below, the ?w=22 query string is part of the static resource (origin image):
When using ci_url_encoded=1 to encode URLs with space in the filename, please consider the example: Image: https://freeaccessdemo.blob.core.windows.net/myfiles/Image with space in the name.jpg
Need to be encoded according to RFC-3986 (percent-encoding):
And if for example, we have extra values added to the origin resource like v=13, the final Cloudimage URL will look like this: