Only this pageAll pages
Powered by GitBook
Couldn't generate the PDF for 125 pages, generation stopped at 100.
Extend with 50 more pages.
1 of 100

Cloudimage 2025 public docs

Loading...

Transformations

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Caching and acceleration

Loading...

Input formats

We support all the major image formats, and a large number of more confidential ones.

We are obviously expanding our support to include any new significant formats being created. As of today, we have full support for the following origin formats and the ability to apply transformations for them:

Input format supported

Adobe Photoshop Document (PSD)

AVIF - AV1 image format

Bitmap (BMP)

Encapsulated PostScript (EPS)

Graphics Interchange Format (GIF)

High Efficiency Image File Format (HEIC)

Welcome to Cloudimage

Cloudimage helps you store, optimize, transform, and deliver your media at scale.

Leverage Cloudimage to automatically compress and accelerate images, videos, PDFs, CSS, and JS over CDN, ensuring faster websites, smoother apps, and better user experiences.

What you can do with Cloudimage

  • Optimize and deliver any media: images, videos, PDFs, CSS, and JS with on-the-fly compression and CDN acceleration.

Asset Variation Builder

Create and preview image transformations directly in the Cloudimage UI - no code needed

The Asset Variation Builder (AVB) lets you create and preview image transformations directly in the Cloudimage UI — no coding needed. Non-Developers using Cloudimage can easily gain control with instant previews of future image transformations before creating a .

While building your URL transformations, you can easily spot the active parameters in the different categories thanks to a blue dot: Format, Adjust

Once satisfied, save the transformation as a preset to apply consistent templates across all your images. Every adjustment is shown live in the Asset Library in "Asset Details" / "Variations", so you see the exact output before saving.

Preview image transformations Stop guessing URL parameters: visually build your transformation, preview results in real time, and save as reusable presets. These presets ensure consistency, speed up content workflows, and empower non-technical teams to manage image variants independently.

Supported features in the AVB:

Icon (ICO)

JPEG-compressed images

JPEG2000-compressed images

Portable Document Format (PDF)

Portable Network Graphics (PNG)

Scalable Vector Graphics (SVG)

Tag Image File Format (TIFF)

WebP image format

Image compression & format

  • Automatic best format or force WEBP, JPEG, PNG, GIF

  • Quality settings (lossless, adjustable compression)

  • Image operations

    • Resize by width & height (with enlargement prevention)

    • Cropping options: automatic gravity, positionable, focal point, face crop, aspect ratio crop, face hide

    • Fit, Cropfit, Background color, Bound, Boundmin, Cover

    • Flip, Rotate, Rounded corners, Trim

  • AI operations

    • Background removal

    • Face blurring

  • Image filters

    • Adjustments: brightness, contrast, saturation, blur, sharpen

    • Colorize: overlay, grayscale, sepia, pixelate, duotone, invert

  • Watermarking

    • Static watermark

    • Dynamic watermark

  • preset

    Color manipulation

    Color effects and filters

    Adjustment

    Modify brightness, contrast and saturation

    Shortening URLs

    Making URL more semantic and SEO-friendly

    Setup

    Configure your Cloudimage image acceleration and optimization engine

    Integrate pixel-perfect images and videos on your website thanks to powerful Responsive Libraries.

  • Create reusable image Presets: use the Asset Variation Builder to visually build transformations (crop, resize, background removal, face blurring, etc.) and save them for consistent formatting.

  • Centralize your assets: upload, preview, edit, and enrich files directly in the Asset Library.

  • Boost SEO, GEO, and accessibility: generate smart alt text and auto-tags automatically with Visual AI.

  • Why Cloudimage?

    • No more slow-loading websites caused by heavy visuals.

    • No need for complex scripts or hours of manual Photoshop edits.

    • Easy tools for marketers or e-commerce managers, and developers alike.

    • Future-proof workflows: from SEO-ready alt text to adaptive video streaming.

    Cloudimage is provided by Scaleflex alongside the Visual Experience Platform, a collaborative suite of solutions for media management at scale

    How does it work?

    Cloudimage URL Format:

    //token.cloudimg.io/original_image_url?operations&filters&watermarks

    token

    Your Cloudimage customer token. Subscribe to get one. You can also for a customized token.

    original_image_url

    That's an easy one :)

    Image manipulation operations like width, height, crop, fit, rotate, trim. For a full list, see .

    Use filters like contrast, pixellate, blur, greyscale and sharpen to apply different effects on your image. For a full list, see .

    Cloudimage can place a watermark in your images if you want to protect them from copying, or tag them with a custom text. More details in the section.

    Cloudimage supports chaining multiple transformations in a single URL, such as crop, resize, format conversion, filters, or watermarking. Here is the step-by-step flow for your asset transformations:

    1. Cloudimage downloads your original asset (image, video, PDF, CSS, JS).

    2. On-the-fly, it applies a selection of 50+ transformations and filters.

    3. Optimized files are served worldwide via a rocket-fast CDN.

    If you host your images on a Web Server, Image Repository, or Storage Bucket sitting behind a Firewall or protected by authentication, make sure your images are accessible over HTTP(S) and that you have whitelisted our infrastructure and are in possession of the required credentials. Otherwise, Cloudimage servers will not be able to download the originals.

    Examples:

    Preview
    Cloudimage URL syntax

    Preview transformations instantly in the UI, save them as presets, and deliver them globally through our premium CDN infrastructure.

    We have documented the most common resizing functions here. Cloudimage supports many more and we can even build them for your specific use-case, please contact us if you don't find your luck!

    Focal point crop

    Sets the crop focal point coordinates

    Allows to crop an image by defining the coordinates of the crop focal point. It is useful when you want to crop images where the coordinates of the point of interest are already known.

    To set the coordinates of the focal point, use the gravity=X,Y operation where X and Y are the coordinates of the focal point (in pixels). Alternatively, you can set the coordinates as a percentage of the original image - gravity=Xp,Yp or gravity=xc,yc, where X,Y=0..100 and x,y=0..1.

    gravity=X,Y

    gravity=Xp,Yp|xc,yc

    Device pixel ratio

    Delivers the optimal size based on device pixel-ratio

    Allows you to deliver the proper image dimensions according to a defined device pixel ratio. This operation can help with conversion between device-independent pixels and CSS (reference) pixels. Useful in responsive image solutions using the srcset HTML attribute. Allows positive values limited to 5.

    dpr=X

    Examples

    Preview

    Color management

    ICC profiles and sRGB compression

    By default, if the origin image has an embedded ICC profile, the image is converted to the sRGB color space, and the ICC profile is removed from the compressed image.

    If you prefer to retain the original ICC profile instead of converting the image to sRGB, you can activate the Keep origin image ICC profile option in the admin panel (Image Settings -> Compression).

    When using this option, to avoid embedding very large ICC profiles, you can set the maximum permitted ICC profile size (in kilobytes) along with setting the Convert ICC profile to sRGB if too large option.

    https//token.cloudimg.io/{origin_image_url}?func=cropfit&w=500&h=350&bg_colorize=navy&contrast=10&q=90
    here
    ask us
    operations
    Image watermarking
    filters
    Image filters
    watermarks
    Image watermarking
    /samples.scaleflex.com/ny_doc.jpg?func=cropfit&w=500&h=350&bg_img_fit=1&bg_colorize=navy&bg_opacity=0.5&bg_blur=20
    /samples.scaleflex.com/flat1.jpg?w=450&q=90&contrast=10&saturate=30&wat=1&wat_gravity=northeast&wat_scale=25&wat_pad=10

    JS/CSS optimization

    Minification of JS and CSS files

    process=minify-css process=minify-js

    Cloudimage supports on-the-fly optimization of CSS and JS content to further facilitate faster loading of your website or web application.

    Examples

    /samples.scaleflex.com/bootstrap.css?func=proxy&process=minify-css (152 kB minified vs. 192 kB original)

    /samples.scaleflex.com/jquery.js?func=proxy&process=minify-js (111 kB minified vs. 219 kB original)

    Security

    Securing your token, account and origin server

    Implementation

    Configure your website or web application to use Cloudimage

    CMS plugins

    Plugin implementation for content management systems

    Shopify tutorial

    Step-by-step instructions how to set up Cloudimage with Shopify

    Examples

    Original image: /docs/castle.jpg?w=1000

    Preview
    Syntax

    Please note that the focal point in gravity=X,Y has to be defined as coordinates X and Y of the full-sized origin image and not the scaled-down version.

    Syntax

    No dpr parameter (assumed dpr=1):

    Device pixel ratio 1.75:

    Face hide

    Crop operation which removes faces from the top of the image

    Crops out the topmost part of an image if it contains a face.

    To control the margin when cropping the face out, you can use the face_margin=Y operation where Y is a percentage of the face height. Its default value is 20. You can also use negative numbers if you would like to keep part of the face.

    func=facehide

    Examples

    Preview
    Syntax

    Rotate

    Arbitrary angle rotation

    Rotates the image by a specified angle, counterclockwise. You can use bg_color=X to set the background fill color if the rotation angle is not divisible by 90.

    r=X

    Examples

    Preview
    Syntax

    Please note that image rotation is performed before resizing operations.

    Boundmin

    Resize with minimum size constraints (to fill a box)

    Resizes an image while bounding the smaller dimension to the desired width or height while keeping proportions. Delivers the resulting image via CDN.

    func=boundmin

    Please note that the larger dimension of the resized image will be equal to or greater than the dimensions set in the URL. If you would like to fit the image to set width and height, you should use either Fit or Bound.

    Examples

    Preview
    Syntax

    Flip

    Mirror image

    Mirrors the image horizontally and/or vertically.

    flip=h | flip=v | flip=hv

    Examples

    Preview
    Syntax

    If the image is also rotated, rotation is performed after the image has been flipped.

    Face blur

    Detects all faces in the image and applies blur to conceal them. To activate the filter, set X to 1 (blur_faces=1). You can control the blur radius (default: R=30) and sigma (default: S=1000).

    blur_faces=1[,R[,S]]

    Examples

    Preview
    Syntax

    Sepia

    Sepia tone

    To apply a sepia effect to your images, you can use the sepia=1 parameter.

    sepia=1

    Preview
    Syntax

    Original image:

    Sepia tone:

    Original image:

    Duotone

    Duotone transform

    Create a duotone effect by using duotone=C1,C2[,Y], where C1 and C2 are the colors for the duotone (hex value or color name) and Y is the opacity (Y=0..1, default1).

    duotone=C1,C2[,Y]

    Preview
    Syntax

    Original image:

    Invert

    Color inversion

    To invert the colors of an image, use the invert=1 parameter.

    invert=1

    Preview
    Syntax

    Original image:

    Blur

    Gaussian blur

    Applies Gaussian blur to the image. The parameter value (X) is the kernel size of the filter in pixels.

    blur=X

    Examples

    Preview
    Syntax

    Static content

    Static file acceleration

    func=proxy

    Cloudimage offers you the option to deliver any file, including non-processable files - static content like JS or CSS files, via our Content Delivery Network.

    By default, all URLs are regarded as images. To deliver a non-image file, you have to use the func=proxy option:

    /samples.scaleflex.com/bootstrap.css?func=proxy

    Cloudimage can automatically use the proxy function for all files that don't have an image file extension. This however will require all your images to have proper file extensions. If you prefer this behavior, you can switch it on in your Admin Console (Image Settings / Compression / Enable static Content acceleration):

    Please note that PDF documents are always converted to images (for more info, please check the section). If you want to deliver PDF images as such, you need to use func=proxy:

    Basic authentication HTTP

    Public or authenticated generic HTTP storage

    If your images are stored at URL https://mystorage.example.com and you can access image.jpg at the following URL:

    //mystorage.example.com/image.jpg

    You should enter the data as follows:

    All aliases have to be prefixed and suffixed by underscores. Please note that all aliases have to be unique for your account - aliases set in the storage sections cannot be used in the alias section.

    Your storage is now accessible by using the alias entered in the Cloudimage Alias field:

    //your-token.cloudimg.io/__ownstorage__/image.jpg

    If your storage requires authentication, you can enter your username and password:

    Background removal

    Isolate the main object in the image and remove the background

    bg_remove=1

    Background removal automatically detects the foreground object and isolates it by removing the background of an image using advanced AI technology. It can help you create a solid or transparent background for your pictures. This can give your application or website an overall polished look. Moreover, product images with a clear-defined foreground can be indexed better in search engines which rely on AI classification.

    Please keep in mind that the background removal operation is asynchronous which means that the first request will return the original image (with short cache value) while the image is being processed in the background. The status is checked on each consecutive request and after the operation is complete, the origin image is replaced and the standard caching settings are set.

    Examples

    Preview
    Syntax

    Feel free to try the background removal algorithm with your own images on our .

    Color overlay

    Colorize the image with an overlay

    To create a color overlay by using colorize=X[,Y], where X is the color of the overlay (hex value or color name) and Y is the opacity (Y=0..1, default 0.5).

    colorize=X[,Y] | colourise=X[,Y]

    Preview
    Syntax

    Width and height

    Proportionally resize an image to the desired width or height

    Resizes an image to a specified width or height while preserving its original aspect ratio. You need to specify the width or height parameter in pixels. After transformation, the image will be compressed and delivered via CDN.

    width | w

    height | h

    Cover

    Resize ignoring proportions

    Resizes the image to a specified width and height without keeping the original proportions and delivers the resulting image via CDN.

    func=cover

    The cover resize function does not keep proportions and might distort your original image. This mode should be used carefully.

    Bound

    Resize with maximum size constraints (fit in a box)

    Resizes to a given width and height box and keeps proportions. Similar to but without adding padding. Delivers the resulting image via CDN.

    func=bound

    Examples

    Preview
    Syntax

    Rounded corners

    Apply rounded corners with specified radius

    Rounds the corners of images with a radius of X pixels. If you wish to fill the cut corner(s) with a specific color, you can use the bg_color parameter.

    radius=X (all corners are rounded with radius X pixels)

    radius=R1,R2,R3,R4 (values for each corner, with max being the min px of the 2 sides around corner)

    If four values are provided, these values correspond to the four corners: R1 = top-left corner, R2 = bottom-left corner, R3 = bottom-right corner, R4 =top-right corner. For example, to round only one of the corners with the maximum possible radius, you need to use radius=max,0,0,0.

    Contrast

    Brightness correction

    To adjust the contrast, you can use the contrast filter and set the desired adjustment value.

    contrast=X

    Examples

    Preview
    Syntax

    Saturate

    Color saturation correction

    To adjust the color saturation, you can use the saturate=X filter and set the desired adjustment value (X= -100..100). Negative values will decrease color saturation while positive ones will increase it.

    saturate=X

    Examples

    Preview

    Grayscale

    Black and white conversion

    Transforms the image into a black-and-white image.

    gray=1 | grey=1

    Examples

    Preview
    Syntax

    Sharpen

    Unsharp mask

    Sharpening is a powerful tool to emphasize texture and details, especially on smaller images, e.g. thumbnails. Cloudimage can apply an unsharp mask filter which will make your image look sharper. You can specify the filter radius (X) in pixels.

    sharp=X

    Examples

    Preview
    Syntax

    Pixelate

    Mosaic filter

    Applies a pixelation effect to an image. You can set the desired block size in pixels. If the image is resized the filter is applied after resizing.

    pixelate=X | pixellate=X

    Examples

    Preview
    Syntax

    Image compression

    You can change the compression (output format and quality) of your image by using compression filters. You can use the compression filters alongside and .

    By default, Cloudimage delivers the images as WebP. If the format is not supported by the client browser, it falls back to JPEG or PNG. If you wish to keep the original format, you can use force_format=original.

    You can of course force a specific output format(s). More details can be found in the image formats section.

    Most of the on-the-fly image transformations can be configured using the , an in-line URL builder to preview each image transformation instantly.

    Amazon S3

    Public or authenticated Amazon S3 bucket

    If your images are stored at a bucket named mysamplebucket at the eu-central-1 region and you can access image.jpg at the following URL:

    //s3.eu-central-1.amazonaws.com/mysamplebucket/image.jpg

    You should enter the data as follows:

    All aliases have to be prefixed and suffixed by underscores. Please note that all aliases have to be unique for your account - aliases set in the storage sections cannot be used in the section.

    Your storage container is now accessible by using the alias entered in the Cloudimage Alias field:

    //your-token.cloudimg.io/

    Domain whitelisting

    Allow fetching images only from a pre-defined list of origins

    As a reminder, a Cloudimage URL looks like this:

    //token.cloudimg.io/original_image_url?operations&filters

    By default, images from any origin domains can be resized by Cloudimage. The storage and traffic used by these images will count toward your plan’s allowance. In the Cloudimage admin console, you can restrict the list of origin server URLs your token can transform images from.

    If you are using and you have Domain whitelisting enabled, you have to include all aliases in the whitelisted domain list.

    Origin URL prefix

    Using a single origin server for your files

    To make your Cloudimage URLs shorter and improve SEO, you can configure an origin prefix. For example, if your images are stored at the URL https://hello.s3.aws.com/, you can set up prefix URL:

    When you use:

    //token.cloudimg.io/photos/paris.jpg?width=800

    Cloudimage will search the origin image at the URL:

    //hello.s3.aws.com/photos/paris.jpg

    By using the origin prefix, you can avoid exposing the URL of your media to users.

    Adobe Commerce (Magento)

    Magento plugin

    Cloudimage can be implemented to accelerate Magento shops in 2 modes:

    Modes
    Implementation
    Benefits

    SVG compression

    Optimize filesize of SVG images

    Cloudimage offers automatic optimization of Scalable Vector Graphics (SVG) files which can reduce the file size by up to 80% without visual appearance deterioration. This is possible since most SVG editors include unnecessary information which can be omitted. Moreover, most shapes in SVG files can be simplified.

    Preview
    Syntax

    Origin security

    Protect your origin with custom request headers

    Identification headers

    Cloudimage allows you to set up one or many global headers which are sent to the origin on every request.

    You need to enter the name and value of the header(s) to send. All these headers will be automatically sent for each request made with your token which allows you to set up your origin to accept only requests containing these headers.

    Connecting storage bucket

    Using third-party origin file storage

    Cloudimage can download your origin images/files from any server or storage bucket over HTTP/HTTPS/FTP. Setting up an external storage is optional and you can use Cloudimage with your origin image URLs as shown in the introduction - .

    If the images are not publicly available, you have to configure your storage containers and set authentication parameters. If you are filtering access to your image storage by IP addresses, to get help with configuring for Cloudimage to request origin images over the specified proxy and have all Cloudimage requests coming from the same IP address.

    You can set up external storage in the Storage section in the admin panel by using the Connect External Storage button.

    You can set up an , , or any generic HTTP-based storage (see .

    Brightness

    Brightness correction

    To adjust the brightness, you can use the bright filter and set the desired adjustment value.

    bright=X

    Examples

    Preview
    Syntax

    Microsoft Azure Blob

    Public or authenticated Microsoft Azure Blob

    If your images are stored at a blob with account my_blob in a container named my_container and you can access image.jpg at the following URL:

    //my_blob.blob.core.windows.net/my_container/image.jpg

    You should enter the data as follows:

    All aliases have to be prefixed and suffixed by underscores. Please note that all aliases have to be unique for your account - aliases set in the storage sections cannot be used in the section.

    Your storage container is now accessible by using the alias enter in the Cloudimage Alias field:

    Token security

    Protect your Cloudimage token from abuse

    URL signature

    Protect your Cloudimage URLs from tampering

    To prevent URL tampering and protect your token, every Cloudimage URL can be secured with an SHA-1 HMAC signature.

    Please be aware that when the URL signature is activated for your token, all Cloudimage URLs which are not signed properly will cease to work.

    The signature is calculated as follows:

    The syntax to process an image is:

    //token.cloudimg.io/original_image_url?operations&filters&ci_sign=Signature

    Because the Salt is a shared secret between you and Cloudimage, only you will be able to calculate the signature of your images.

    Domain whitelisting

    Specify which domains your Cloudimage token can download original images from. You can limit the list to a few domains that you own to make sure no one uses your token on his or her URLs.

    URL signature

    Sign your Cloudimage URLs with an SHA hash to prevent someone else from using your Cloudimage token.

    URL sealing

    With this feature, you can sign only part of the url which will allow you to add more parameters to the URL while protecting the sealed ones.

    The Origin URL prefix will apply to all Cloudimage transformations for your token. Make sure that all your origin images are served from the Origin URL prefix domain. Should you have multiple source domains, then please use aliases instead.

    The Origin prefix will interfere with your Cloudimage Library stored assets. In order to use this feature in conjunction with the Cloudimage Library, please contact our support.

    If your origin server needs authentication, please refer to the Connecting storage bucket section.

    Welcome to Cloudimage
    Contact us
    proxy
    Amazon S3
    Google Cloud Storage
    Microsoft Azure Blob
    Basic authentication HTTP
    /samples.scaleflex.com/birds.jpg?w=400
    /samples.scaleflex.com/birds.jpg?w=400&dpr=1.75
    /samples.scaleflex.com/fields.jpg?w=400
    /samples.scaleflex.com/fields.jpg?w=400&invert=1
    PDF to image
    /samples.scalflex.com/satie2.pdf?func=proxy
    Examples
    Preview
    Syntax

    Examples
    Preview
    Syntax

    Fit
    Examples
    Preview
    Syntax

    Transparent corners (default, if the formats supports transparency):

    Solid color corners:

    Maximum radius on two corners only:

    Original image:

    Increased contrast:

    Decreased contrast:

    Syntax

    Original image:

    Increased saturation:

    Desaturate

    Using saturate=-100 will remove all color information and convert the image to grayscale.

    Please keep in mind that desaturating an image just discards all color information. If you prefer to create a grayscale image while taking into account the human visual system's color perception, you should use the gray parameter instead.

    Examples

    Preview
    Syntax

    Desaturation:

    Grayscale:

    Original image:

    Grayscale image:

    Only resize:

    Resize and sharpen:

    Original image:

    Pixelate effect:

    A modern format suitable for most images. Supports trasnparency and offers both lossy and lossless compression.

    The most popular and widely-supported format. Used by digital cameras. Suitable for photographic images. Lossy compression only.

    Image format with transperency support suitable for raster logos, charts, infographs, etc. Lossless compresison only.

    Image operations
    Image filters
    Asset Variation Builder
    __amazonaws__
    /
    image.jpg

    If your S3 bucket requires authentication, you can enter your access key ID and secret access key:

    Aliases
    Step 1. Configure domain whitelist

    Log in to your Cloudimage admin console and navigate to Image settings / tab Domains. Scroll down to Whitelisted domains. Then configure your original image domains / S3 buckets.

    Please note that when you whitelist eg. sample.li, this will also whitelist all its subdomains sub1.sample.li, www.sample.li, along with any recursive (sub...)sub.domain from the listed one.

    When adding a domain to the whitelist, do not include http:// or https://.

    Whitelist and static content

    By default, Cloudimage does not enforce the domain whitelist when deliveringStatic content. If you would like to restrict delivering static content to whitelisted domains only, you can enable the Honor whitelist when delivering static content option in the Admin console.

    Step 2. Try it out!

    This Cloudimage URL works (the sample.li domain is whitelisted):

    //doc.cloudimg.io/http://samples.scaleflex.com/boat.jpg?width=500

    If the domain is not in your whitelisted domains list, the request will fail. In this example, pbs.twimg.com is not whitelisted, so the request is blocked.

    //doc.cloudimg.io/pbs.twimg.com/profile_images/839721704163155970/LI_TRk1z_400x400.jpg?w=500

    Aliases

    Basic implementation

    Simple configuration change in Magento settings

    JPEG optimization WebP delivery CDN acceleration

    Advanced implementation

    Requires the installation and configuration of the Cloudimage Content Transformation & Acceleration Magento plugin or Github.

    Basic + Responsive images

    In the value field, you could use the following variables:

    • {{header.host}} will allow you to forward the HOST header to your origin;

    • {{req.ip}} will allow you to forward the client's IP address.

    If you have been a Cloudimage customer before 01/01/2023, please contact us to enable this feature.

    Please be aware that this feature needs up to 5 minutes to be propagated to all our servers.

    Original image:

    Increased brightness:

    Decreased brightness:

    //your-token.cloudimg.io/__my-public-blob__/image.jpg

    If your Azure Blob container requires authentication, you have to enter your SAS token (found in your Azure panel) in the respective field:

    Please keep in mind that the SAS token has an expiration date and you have to generate a new one and update it before it expires. Otherwise, our servers will not be able to fetch your media from the storage.

    alias
    Activation

    Before activating the URL signature, please make sure that all Cloudimage URLs contain the proper signature.

    To activate this feature, you need to navigate to Image Settings / Security and activate URL security toggle.

    In the Add Security modal, you need to choose URL Signature and place a string you will be using as salt when generating the URL signature.

    Signature = sha1('Salt' + 'URI')
    where URI = original_image_url?operations&filters

    /samples.scaleflex.com/woman_dress.jpg?w=450&h=600&gravity=auto

    /samples.scaleflex.com/woman_dress.jpg?func=facehide&w=450&h=600&face_margin=10

    /samples.scaleflex.com/earth.jpg?w=400&r=90

    /samples.scaleflex.com/earth.jpg?w=400&r=15&bg_color=10100E

    /samples.scaleflex.com/eiffel_doc.jpg?width=600&height=600&func=boundmin

    Flip horizontally: /samples.scaleflex.com/flat_hd.jpg?w=400&flip=h

    Flip both horizontally and vertically: /samples.scaleflex.com/flat_hd.jpg?w=400&flip=hv

    Original image:

    /samples.scaleflex.com/busystreet.jpg?w=600

    Faces blurred:

    /samples.scaleflex.com/busystreet.jpg?w=600&blur_faces=1

    You can combine any color adjustments and filters to achieve the desired artistic effects:

    /samples.scaleflex.com/face.png?w=400&sepia=1&contrast=24&bright=-10&gray=1

    /samples.scaleflex.com/paris.jpg?w=400
    /samples.scaleflex.com/paris.jpg?w=400&sepia=1
    /samples.scaleflex.com/face.png?w=400

    By default, the image is desaturated first:

    /samples.scaleflex.com/mountains.jpg?w=400&duotone=000080,ffff00

    If you prefer, you can convert to grayscale instead:

    /samples.scaleflex.com/mountains.jpg?w=400&duotone=000080,ffff00&gray=1

    60% opacity (0.6) of the filter:

    /samples.scaleflex.com/mountains.jpg?w=400&duotone=000080,ffff00,0.6

    /samples.scaleflex.com/mountains.jpg?w=400

    Original image: /samples.scaleflex.com/ny_doc.jpg

    Blur applied: /samples.scaleflex.com/ny_doc.jpg?blur=6

    /samples.scaleflex.com/face.png?w=400

    /samples.scaleflex.com/face.png?w=400&bg_remove=1

    /samples.scaleflex.com/purse.jpg?w=400

    /samples.scaleflex.com/purse.jpg?w=400&bg_remove=1&bg_color=456

    AI demo page

    Original image: /samples.scaleflex.com/frog.png?w=400

    Color overlay: /samples.scaleflex.com/frog.png?w=400&colorize=red,0.85

    Desaturate and color overlay: /samples.scaleflex.com/frog.png?w=400&saturate=-100&colorize=7af,0.6

    Grayscale and color overlay: /samples.scaleflex.com/frog.png?w=400&gray=1&colorize=7af,0.6

    Original (1543 bytes):

    https://samples.scaleflex.com/5603.svg

    Compressed SVG (221 bytes): https://samples.scaleflex.com/5603.svg?force_format=svg

    /samples.scaleflex.com/castle.jpg?w=450&h=300&gravity=1750,1000
    /samples.scaleflex.com/castle.jpg?w=450&h=300&gravity=80p,50p

    Trim

    Image trimming

    Removes any single-color padding around the image if present.

    The parameter does not specify the amount of border or frame to trim but rather how aggressive the trim algorithm should be. A bigger value of the parameter (e.g. 25) might trim part of the image. Typical values are between 0 and 10.

    This allows you to use the same parameter values for all your images.

    trim=X

    If the image is resized with the width and/or height commands, the resizing is performed after the border (if present) is trimmed.

    Trim gravity

    When gravity=trim is set alongside trim=X (for the , or operations), the focal point is defined depending on the trim result:

    • When the image is trimmed on all sides, gravity is set to center;

    • When no trim has been performed, gravity is set to smart;

    • If the image has been trimmed on some edges only, the gravity is set to:

      • fit operation - gravity is set to the edges opposite of the trimmed ones so that the canvas is extended only on the trimmed sides;

    Examples

    Preview
    Syntax

    Face crop

    Crop operation focusing only on one face

    Finds the most prominent face in the image and crops it to the specified with the width and height parameters dimensions. If you however provide only one dimension, the other dimension will be chosen automatically to keep the aspect ratio of the face.

    func=face

    If there is no face in the image or many faces are found, the operation defaults to a standard crop.

    Examples

    Preview
    Syntax

    Face margin

    Sets margins around the face. You can set equal margins with face_margin=X or separate horizontal and vertical margins (face_margin=W,H).

    face_margin=X|W,H

    Examples

    Preview
    Syntax

    Prevent enlargement

    Do not upscale an image if target size is larger than the origin image

    Disallows image upscaling when resizing with the width or height operations. When resizing, the image can be either scaled down or up depending on the original and target dimensions. If you want to ensure that the image is never upscaled - so the output will not be larger than the original, you can use the org_if_sml parameter.

    org_if_sml=1

    Examples

    Preview
    Syntax

    Optipress

    Machine learning based image compression

    Different images compressed with the same compression parameters may result in different perceptive quality. Moreover, the same image in different sizes may require different compression strategies to achieve maximum size gain without visible quality loss.

    To overcome this, you can use our Optipress JPEG compression algorithm.

    • Optipress finds out the best JPG compression approach by analyzing specific image features and current compression parameters.

    • A Machine Learning model determines the best compression strategy for this image.

    • Quality is then evaluated based on a simulation model of the Human Visual System to achieve optimum compression without perceptive quality deterioration.

    By using Optipress, you can get the most out of the JPEG compression format.

    Optipress achieves the best results when re-compressing JPEG files and when the image quality is crucial.

    Usage

    Images created by Optipress fully comply with baseline JPEG specifications and are compatible with all JPEG encoders.

    Examples

    Preview
    Syntax

    Advanced implementation

    Cloudimage Content Transformation & Acceleration in Magento

    Prerequisites

    To use the plugin, you need to have a Cloudimage account. You can create one on the Cloudimage registration page.

    Step 1. Install the Cloudimage module

    To be able to install the module by Composer, you need to get a copy of the module on the Magento Marketplace, or directly from Github.

    Enable and install module in Magento:

    Step 2. Activate the Cloudimage module

    Activate the module and enter your Cloudimage token in the module configuration in Magento admin interface: Stores / Configuration / Cloudimage by Scaleflex / Cloudimage Responsive:

    Step 3. Configure the module

    option
    description

    Advanced settings (optional)

    This setting is for advanced users only and allows to inject a custom JS function into the Magento templates in order to support some specific Magento templates. Feel free to in order to get the custom JS function to address issues with your specific template.

    option
    description

    Custom themes (optional)

    Once activated, the Cloudimage Responsive module will replace your template's classic image tag elements on-the-fly. This functionality is 100% compatible with the Magento Luma theme.

    In the case of a personalized template, please consult the section in the Cloudimage plugin Github page.

    Account security

    Multi-factor authentication to the Cloudimage Console

    Single Sign-On

    The access to the Cloudimage administration Console supports SSO over SAMLv2. Cloudimage officially supports several Identity Providers (IDPs) and can integrate with any IDP that speaks SAML 2.0. You can integrate Cloudimage as a Service Provider (SP) with your IDP to allow your Cloudimage administrators to log in to the Console with a federated account and enjoy SSO.

    Please note that SSO is only available for accounts with company email domains on ENTERPRISE . Gmail.com, yahoo.com, aol.com, etc. are not supported for SSO.

    Configure

    Step 1. Collect the Cloudimage Service Provider details

    1. Copy the ACS URL / Consumer URL and Entity ID / Audience ID or download the Service Provider XML from the link provided. These values are needed for configuring Cloudimage as a Service Provider or Relying Party Trust (ADFS) in your IDP.

    2. Within your Identity Provider, add a Service Provider (generic term, Ping Federate), Application (OKTA), or Relying Party Trust (ADFS) using the information gathered in the previous step.

    3. Make sure the IDP is returning the user's email address as NameID in the SAML assertion with the format emailAddress (see note below for ADFS).

    ADFS as IDP

    If you are using ADFS as IDP, you will need to configure the following two Issuance Transform Rules for the Relying Party Trust:

    Step 2. Configure the Identity Provider details in the Cloudimage Console

    Fill in the Identity Provider section:

    • Entity ID: the entity ID from your IDP as per the IDP's metadata.xml.

    • SSO Target URL: IDP single sign-on URL.

    • SAML Single Logout Service URL: IDP single sign-out URL (usually the same as SSO Target URL).

    Step 3. Test Single Sign-On

    Using your Cloudimage admin account's email from your company, try to .

    Enjoy SSO and additional security!

    Google Cloud Storage

    Public or authenticated GCP storage

    If your images are stored in a bucket named mysamplebucket and you can access image.jpg at the following URL:

    //www.googleapis.com/upload/storage/v1/b/mysamplebucket/o/image.jpg

    You should enter the data as follows:

    All aliases have to be prefixed and suffixed by underscores. Please note that all aliases have to be unique for your account - aliases set in the storage sections cannot be used in the alias section.

    Your storage bucket is now accessible by using the alias entered in the Cloudimage Alias field:

    //your-token.cloudimg.io/__googlecloud__/image.jpg

    If your Google Cloud bucket requires authentication:

    • You need to generate an Authentication JSON file using the guide in the Google Cloud documentation -

    • You will be provided with a JSON file to be saved on your computer

    • Copy the contents of this file and paste it into the field that appears after pressing "AUTH KEY" in the storage settings

    Contentful

    Cloudimage Contentful plugin

    Installation

    Prerequisites

    You need to have a Contentful account. Contentful is 100% Cloud Native, so you have to sign up for a hosted CMS at https://be.contentful.com

    You’ll get :

    Step 1. Install from Contentful Marketplace

    Find it here and install it.

    Or click "Install now" on

    Step 2. Configure App

    Then save and install.

    Step 3. Create Content Type

    Absolutely important: The Field ID must be "cloudimage".

    By doing the above, you will associate the Cloudimage field (the field that you named Cloudimage) to the Cloudimage App. Recall the warning message you saw during the app configuration stage "There are no content types with ..."? By doing the above, that will no longer be an issue.

    Usage

    Now you can create a content item of Cloudimage type.

    You can add and remove images.

    Cloudimage will optimize those images in the background. (If you inspect in developer console, you will see the call to its infrastructure)

    FAQ

    Shopify integration - frequently asked questions

    Can I disable Cloudimage with a single click?

    Yes you can enable and disable Cloudimage on your Shopify store with a single click. Navigate to Online store > Themes > Customize theme. In the sidebar, under general settings open Cloudimage.io and enable/disable it.

    Can Cloudimage automatically detect the right image dimension and load it?

    No Cloudimage only changes the base URL of your images because there is no way the server would have knowledge of your website layout. However, just by loading images through Cloudimage URL-endpoint, your images are automatically optimised for format and quality.

    How do I make sure my integration is working?

    Once you are done editing these files, save these files. Now refresh the webpage for your Shopify store and check the image URLs. They should now load from URLs beginning with https://{token}.cloudimg.io/v7. You can use the Chrome Developer Tools to check that all the images are being loaded via Cloudimage.io and that all images are loading correctly. If you find that images on a particular page or section are still being served from Shopify, then find out the responsible theme file and edit it as well.

    Basic implementation

    Magento simple implementation

    This simple and fast implementation in Magento 2 enables JPEG optimization, WebP compression and CDN delivery of your images.

    Prerequisites

    To use the plugin, you need to have a Cloudimage account. You can create one on the Cloudimage registration page.

    Step 1. Login to Magento

    First, you need to log in to your Magento 2 website admin

    Step 2. Configure the plugin

    On the Admin sidebar, go to Stores > Settings > Configuration.

    Navigate to the settings page - from the left panel, in the General group, choose Web.

    Then, you need to set up the Base URLs.

    It is important to set this prefix in both - Base URL for User Media Files and Secure Base URL for User Media Files.

    In Base URL for User Media Files in Base URLs and Base URLs (Secure) add the following value, replacing your token: https://<token>.cloudimg.io/{{secure_base_url}}pub/media/

    For example, if your website is https://sfxmagento.site, and your token is demo, the final URL address should be: https://demo.cloudimg.io/https://sfxmagento.site/pub/media/

    You can also use your own domain instead of {token}.cloudmg.io via CNAME records. Please and an engineer will help setting it up.

    When complete, do not forget to click Save Config.

    Step 3. Flush the cache of Magento

    On the Admin sidebar, go to System > Tools > Cache Management and Flush the cache of Magento.

    Magento’s cache management system is an easy way to improve the performance of your site. Whenever a cache needs to be refreshed, a notice appears at the top of the workspace to guide you through the process. Find additional information and tips in this .

    Verify your HTML page source

    Please ensure that you are properly delivering static content via the CDN.

    You can now modify your template to resize your images with us.

    Spryker

    Installation

    Start up the Spryker shop and run:

    composer require scaleflex/spryker-cloudimage

    Configuration in the shop

    To get the package running, register the "Scaleflex" namespace into the config_default.php in the KernelConstants::CORE_NAMESPACES

    Set these constants in the config, where it is needed. the BaseUrl and the ignoredUrlPaths need to be set according to the use case.

    Integration into the code

    Register the Twig plugin in the Pyz\Yves\Twig\TwigDependencyProvider.php

    Example

    Use the TwigFilter for the images. Here is an example of how to extend the Pyz\Yves\ShopUi\Theme\default\components\molecules\lazy-image.twig. Everywhere this molecule will use Cloudimage and apply a grey filter.

    How to use the plugin

    Cloudimage documentation for the operations:

    Cloudimage documentation for the filters:

    Video processing

    Short clip optimization and transcoding for websites and web applications

    Cloudimage helps you deliver videos faster and lighter by compressing high-resolution files and transcoding them for adaptive streaming. This feature is suited for short clips for websites and web applications such as hero videos or product videos.

    For optimal video delivery, compression and transcoding are enabled by default. Disabling them may slow playback and increase CDN usage.

    Reduce the weight of your videos automatically upon upload. To set it up, go to Settings > Video Settings.

    • Automatic compression: toggle on to enable. Once done, Cloudimage will generate lower-resolution versions (1080p, 720p, 360p) in MP4 format for all videos stored in the Cloudimage Asset Library.

    • Target bitrate: default 400 Kbps

    The automatic format delivery chooses the most efficient codec and format based on the viewer platform support - h265 (HEVC) mp4, vp9 WebM, or h264 (AVC) mp4.

    Cloudimage delivers compressed videos, ready to be played in any video player, including HTML5 native. This ensures faster load times, lower bandwidth usage, and smooth playback across devices.

    Transcoding for adaptive streaming

    For seamless viewing on any connection, Cloudimage can transcode your videos into HLS (HTTP Live Streaming) format. It automatically generates a manifest file compatible with players like .

    • Automatic transcoding: toggle on to enable. Once done, Cloudimage will transcode all videos after upload in the Cloudimage Asset Library.

    This allows your audience to stream videos at the best quality their network can support, without buffering or manual adjustments.

    *Video Compression and transcoding require Visual Operations Credits.

    PDF to image

    Convert a specific page from a PDF document to an image

    doc_page=X

    When you provide a link to a PDF file, the first page is converted to an image and delivered via CDN. You can use all available resizing operations, image filters, watermarking capabilities, and image compression formats. To convert a specific page of the PDF document, use the doc_page=X option:

    Preview
    Syntax

    Positionable crop

    Crops by boundary coordinates

    Allows to crop an image by providing the exact cropping area. It is useful when you want to crop a specific part of the image. To set the coordinates of the crop rectangle, use the tl_px and br_px operations or the X and Y Parameters are an alternative way to set the coordinates.

    tl_px=X1,Y1

    br_px=X2,Y2 X=X1 Y=Y1

    Crop

    Resize and crop to achieve the desired width and height

    Resizes and crops the image to specified dimensions (width and height) while keeping proportions. The resulting image is then compressed and delivered via CDN.

    func=crop

    This is the default resizing mode when both width and height operations are used. You do not need to specify func=crop explicitly.

    Aliases

    Use short pre-defined aliases for different origin servers

    Aliases are a very easy way to hide parts of your URLs: They can be useful if your images come from different image repositories (for example: https://static.mycompany.com/bucket/img) and you do not wish these repositories to be publicly shown in your code. If you use only one repository for all your images, you can alternatively use .

    With aliases, you can easily "mount" src0 to static.mycompany.com/bucket/img.

    Dynamic watermark

    Dynamic (defined in URL) image overlay

    The dynamic watermark function allows you to specify the watermark image in the Cloudimage URL. This way, different watermarks can be used with different images.

    Available parameters

    Parameter
    Syntax
    Description

    Migrating from another image CDN

    Migrating from another Image CDN

    If your are transferring your image optimisation and CDN service from another provider, Cloudimage provides an easy way to migrate your images without code changes.

    By migrating to Cloudimage, your images will need to be downloaded from their origin and cached by Cloudimage. Make sure your origin is able to process the initial load or to perform a warm-up.

    Case 1: not using a custom CNAME

    Go back to the Cloudimage Console to finish the configuration.

    Signing Certificate: IDP's signing certificate is log inas per the IDP's metadata.xml. This certificate is used by Cloudimage to verify the SAML assertion's signature returned by the IDP.
    plans
    log in
    VideoJS
    /samples.scaleflex.com/flat2.jpg?w=400&radius=25&force_format=png
    /samples.scaleflex.com/car1.jpg?w=400&radius=25&bg_color=cccc30
    /samples.scaleflex.com/hotel.jpg?w=400&h=245&radius=0,max,0,max
    /samples.scaleflex.com/birds.jpg?w=600
    /samples.scaleflex.com/frog.png?width=415
    /samples.scaleflex.com/paris-salon2.jpg?h=430
    /samples.scaleflex.com/mountains.jpg?h=400&w=350
    /samples.scaleflex.com/tesla.jpg?height=350
    /samples.scaleflex.com/tesla.jpg?width=400
    /samples.scaleflex.com/tesla.jpg?width=400&height=400&func=cover
    /samples.scaleflex.com/eiffel_doc.jpg?width=600&height=600&func=bound
    /samples.scaleflex.com/frog.png?w=400
    /samples.scaleflex.com/frog.png?w=400&contrast=30
    /samples.scaleflex.com/frog.png?w=400&contrast=-10
    /samples.scaleflex.com/frog.png?w=400
    /samples.scaleflex.com/frog.png?w=400&saturate=35
    /samples.scaleflex.com/frog.png?w=400&saturate=-100
    /samples.scaleflex.com/frog.png?w=400&gray=1
    /samples.scaleflex.com/paris.jpg?w=400
    /samples.scaleflex.com/paris.jpg?w=400&gray=1
    /samples.scaleflex.com/darkside.jpg?w=300
    /samples.scaleflex.com/darkside.jpg?w=300&sharp=3
    /samples.scaleflex.com/earth.jpg?w=400
    /samples.scaleflex.com/earth.jpg?w=400&pixelate=8
    /samples.scaleflex.com/frog.png?w=400
    /samples.scaleflex.com/frog.png?w=400&bright=15
    /samples.scaleflex.com/frog.png?w=400&bright=-10

    /samples.scaleflex.com/satie2.pdf?w=800&doc_page=2

    /samples.scaleflex.com/satie2.pdf?w=800&force_format=png
    https://cloud.google.com/docs/authentication/getting-started
    contact us
    Magento tutorial for cache management

    Use origin URL

    If enabled, the module will only add query parameters to the image source URL without prefixing it with {token}.cloudimg.io. This is required if you use a dedicated subdomain for delivering your images (media) in Magento. You will need to enable a custom CNAME in Cloudimage.

    Ignore Image Size Node

    Useful for improving compatibility with some themes.

    Ignore Image Size Style

    Useful for improving compatibility with some themes.

    Lazy Loading

    If enabled, images will be lazy-loaded for better loading times and user experience.

    Inject Custom JS function

    If enabled, you will be able to customize the JS function used to get the DOM information dynamically.

    Custom JS function

    The JS function to customize Cloudimage library.

    contact us
    Manual integration in Magento templates
    https://www.contentful.com/marketplace/
    https://www.contentful.com/marketplace/app/scaleflex-cloudimage/
    $config[KernelConstants::CORE_NAMESPACES] = [
        'Scaleflex',
        ...
    ];
    https://docs.cloudimage.io/transformations/image-operations
    https://docs.cloudimage.io/transformations/image-filters
    Example 1

    If your image is currently delivered via:

    Then you need to replace the FQDN from yourdomain.provider.com to token.cloudimg.io/ for the <img src> to become:

    Example 2

    If your image is currently available at http://token.provider/operations/sample.li/flat.jpg and referenced in your code as:

    Then you need to adapt it to be:

    Where:

    • token: your Cloudimage token you obtain after registering for a Cloudimage account

    • operations: the resizing operation(s) as listed under Image operations

    • filters: the filter transformation(s) as listed under Image filters

    Case 2: using a custom CNAME

    Example 1

    If your image is currently delivered via:

    Example 2

    If your image is currently delivered via:

    In both scenarios, migrating to Cloudimage only requires the change of your CNAME record for img.domain.com on your DNS provider.

    Where:

    • token: your Cloudimage token you obtain after registering for a Cloudimage account

    • operations: the resizing operation(s) as listed under Image operations

    • filters: the filter transformation(s) as listed under Image filters

    Cloudimage supports multiple image transformations format, contact us to discuss your migration project.

    contact us
    composer config repositories.cloudimage vcs https://github.com/scaleflex/magento-cloudimage-responsive
    composer require cloudimage/module-responsive-plugin --sort-packages
    php bin/magento module:enable Cloudimage_Responsive
    php bin/magento setup:upgrade
    https://app.contentful.com/spaces/{Your Space ID}/home
    use Scaleflex\Shared\Cloudimage\CloudimageConstants;
    
    $config[CloudimageConstants::TOKEN] = '{{YOUR_TOKEN}}';
    $config[CloudimageConstants::BASE_URL] = 'http://yves.de.spryker.local';
    $config[CloudimageConstants::IGNORED_URL_PATHS] = ['http://yves.de.spryker.local'];
    /**
     * @return \Spryker\Shared\TwigExtension\Dependency\Plugin\TwigPluginInterface[]
     */
    protected function getTwigPlugins(): array
    {
        return [
            ...
            new CloudimageTwigPlugin(),
        ];
    ]
    {% block body %}
        {% set data = data | merge({'imageSrc': data.imageSrc | cloudimage({}, {grey: 1}) }) %}
        ...
    {% endblock %}
    cloudimage({YOUR_OPERATIONS}, {YOUR_FILTERS})
    <img src="https://yourdomain.provider.com/{image_url_or_path}?operations&filters" />
    <img src="https://token.cloudimg.io/{image_url_or_path}?operations&filters" />
    <src="http://img.provider.com/{token}/{operations}|{filters}/{path_fo_folder}/flat.jpg" />
    <src="https://token.cloudimg.io/v7m/{operations}|{filters}/{path_fo_folder}/flat.jpg" />
    <img src="https://img.domain.com/{image_url_or_path}?operations&filters" />
    <src="http://img.domain.com/{token}/{operations}|{filters}/{path_fo_folder}/flat.jpg" />
  • crop operation - gravity is set to the trimmed edges so that the image is not cropped anymore on the trimmed edges.

  • Original image: /samples.scaleflex.com/painting_big.jpg?w=400

    Trimmed image: /samples.scaleflex.com/painting_big.jpg?w=400&trim=10

    Original image: /samples.scaleflex.com/sofa.jpg?w=400

    Trimmed image: /samples.scaleflex.com/sofa.jpg?w=400&trim=10

    Crop
    Fit
    Cropfit
    Examples

    Origin image: /docs/kids.jpg

    Preview
    Syntax

    Combining positionable crop with resize modes

    Positionable crop is a separate operation can be combined with all available resize functions - Width and height, Crop, Fit, Bound and Cover. This resize is always performed after the positionable crop.

    Examples

    Preview
    Syntax

    Examples
    Preview
    Syntax

    Gravity

    Specifies which part of the image you wish to keep while cropping. If you omit the gravity option, central cropping is performed.

    gravity=X

    Available gravity values

    northwest

    north

    northeast

    west

    center | centre (default)

    east

    southwest

    south

    southeast

    auto -

    face -

    smart -

    X,Y -

    Examples

    Preview
    Syntax

    Step 1. Configure aliases

    Log in to your Cloudimage admin console, navigate to Image settings, and scroll down to Aliases. Configure up to 10 aliases:

    All aliases have to be prefixed and suffixed by underscores. Make sure there are no leading or trailing slashes. Please note that all aliases have to be unique for your account - aliases set in the alias section cannot be used in the Storage sections (see Connecting storage bucket).

    Due to the specific way aliases are matched, it is required to use only specific aliases that are not contained in part of other alias strings.

    Example: If you define an alias _demo_one_ then you should not have:

    • _demo_

    • _demo_one_two_

    • _my_demo_one_

    As those would all be matched according to the first overlap (in this example, _demo_). An easy way to overcome this is by both prefixing and suffixing aliases with double underscores.

    Step 2. Construct your Cloudimage URLs

    Without Alias

    //doc.cloudimg.io/http://samples.scaleflex.com/boat.jpg?width=800

    With Aliases

    //doc.cloudimg.io/_sample_/boat.jpg?width=800

    The Aliases will interfere with your Cloudimage Library stored assets. In order to use this feature in conjunction with the Cloudimage Library, please contact our support.

    Origin URL prefix

    use watermark

    wat=1

    (required) Activates the watermark function

    watermark URL

    wat_url=X

    (required) The URL of the watermark image. Can be URL-encoded

    watermark gravity

    wat_gravity=X X=[north|south][east|west]|center| absolute|relative

    Defines the position to "anchor" the watermark to

    watermark scaling (relative to original watermark size)

    wat_scale=X X=0..100

    Watermark image scaling defined in in percent of the watermark dimensions

    watermark scaling (relative to output image size)

    wat_scale=Xp X=0..100p

    Watermark image scaling defined in in percent of the output image dimensions

    watermark padding

    wat_pad=X[p][,Y[p]] X/Y=0..100[p]

    Adds padding from the anchoring point in pixels (X) or in percent (Xp)

    watermark position

    wat_pos=X[,Y]

    sets the position in percent from the resized image; works only with wat_gravity=absolute and wat_gravity=relative

    watermark opacity

    wat_opacity=X X=0..1

    Defines watermark opacity

    Examples

    Preview
    Syntax

    Standard crop: /samples.scaleflex.com/business-portfolio.jpg?w=400&h=300

    Face crop: /samples.scaleflex.com/business-portfolio.jpg?w=400&h=300&func=face

    Face crop: /samples.scaleflex.com/classroom.jpg?h=240&w=380&func=face

    Face crop with automatic aspect ratio: /samples.scaleflex.com/classroom.jpg?h=240&func=face

    /samples.scaleflex.com/business-portfolio.jpg?w=400&h=300&func=face&face_margin=60

    /samples.scaleflex.com/classroom.jpg?h=240&func=face&face_margin=80,30

    Allow upscaling (default): /samples.scaleflex.com/ny_doc.jpg?w=450

    Prevent upscaling: /samples.scaleflex.com/ny_doc.jpg?w=450&org_if_sml=1

    optipress=1

    most conservative setting; image quality is prioritised

    optipress=2

    balanced setting

    optipress=3

    most aggressive setting; optimised for smaller file size

    q=85, 543 kB: /samples.scaleflex.com/paris.jpg?force_format=jpeg&q=85 optipress=3, 347 kB: /samples.scaleflex.com/paris.jpg?force_format=jpeg&optipress=3

    q=85, 246 kB: /samples.scaleflex.com/boat.jpg?force_format=jpeg&q=85 optipress=3, 150 kB: /samples.scaleflex.com/boat.jpg?force_format=jpeg&optipress=3

    Image filters

    Apply image effects and adjustments

    Filters allow you to modify images on the fly by applying different effects.

    Most of the on-the-fly image transformations can be configured using the Asset Variation Builder, an in-line URL builder to preview each image transformation instantly.

    Available filters

    Filter
    Syntax
    Description

    Combining filters

    To use more than one filter, you can either use separate parameters or concatenate them with commas into the f parameter:

    Preview
    Syntax

    Automatic gravity crop

    Automatically detects the focal point

    Chooses the most important image features and objects and sets the focal point on them when cropping.

    gravity=smart

    gravity=auto

    gravity=face

    Smart gravity

    Sets the crop focal point on the people in the image or on the most prominent features if no faces are detected. Useful for creating thumbnails from images with different aspect ratios.

    Examples

    Preview
    Syntax

    Automatic gravity

    Setting the gravity parameter to auto finds the focal point of the image based on entropy.

    Examples

    Preview
    Syntax

    Face gravity

    When using gravity=face, all images with one dominant face are focused on this face upon cropping. If there are many or no faces in the image, gravity falls back to auto.

    If you would like to try and include multiple faces in the image, you can use gravity=smart

    Examples

    Preview
    Syntax

    Text watermark

    Apply text overlay

    If you need to tag an image or add a reference number as an overlay, use the text watermark function.

    Available parameters

    Parameter
    Syntax
    Description

    Examples

    Preview
    Syntax

    Video operations

    Short clip resizing and delivery for websites and web applications

    Cloudimage offers on-the-fly video processing with delivery via CDN using the Cloudimage URL for seamless integration. This feature is suited for short clips for websites and web applications such as hero videos or product videos.

    Input files are limited to 500 MB, 4k resolution and maximum 60 seconds length. For longer videos, only the first minute will be optimized and delivered, resulting in a trimmed video.

    The video files processed in the URLs need the proper extension (eg. .mp4, .webm).

    Available Parameters

    //token.cloudimg.io/original_image_url.mp4?w=600&format=auto

    Parameter
    Allowed values
    Description

    The automatic format delivery chooses the most efficient codec and format based on the viewer platform support - h265 (HEVC) mp4, vp9 WebM, or h264 (AVC) mp4.

    Examples

    Preview
    Syntax

    URL API implementation

    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::

    https://samples.scaleflex.com/flat.jpg

    Then you need to adapt it to be:

    //token.cloudimg.io/https://samples.scaleflex.com/flat.jpg?operations&filters&watermarks

    Where:

    • token: your Cloudimage token you obtain after registering for a Cloudimage account;

    • operations: the resizing operation(s) as listed under ;

    • filters: the filter transformation(s) as listed under ;

    In your code, this URL can be used as a normal image in your <img> elements:

    If you have implemented responsive design with the HTML <picture> and <srcset> elements, then you need to change every <srcset>:

    Becomes:

    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 , and 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):

    To construct a Cloudimage URL from it, the resource is URL-encoded and the width operation can be now used correctly:

    Spaces in the filename

    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:

    The following approach can be used in this case:

    Drupal

    Cloudimage Drupal module

    Installation

    You can install the Cloudimage module from Github or by using Packagist.

    Download from Github

    • Step 1: Download the latest version

    • Step 2: Extract the zip file at location "/modules"

    • Step 3: In Admin go to Extend -> find Cloudimage by Scaleflex -> Install

    Installation with Packagist

    • Step 1: Run "composer require 'drupal/cloudimage_by_scaleflex:^1.0'"

    • Step 2: In Admin go to Extend -> find Cloudimage by Scaleflex -> Install

    Configuration

    • Activation: Enable/Disable the module

    • Standard Mode: Replace image URLs not using any Javascript or Javascript library.

    • Token or CNAME: Please enter your cloudimage token here (eg: abcdefgh), or your complete CNAME (eg. media.company.com) if the configuration is already validated in your Cloudimage Admin.

    Advanced User's options

    • Custom JS Function: The valid js function starting with { and finishing with }

    • Custom Library Options: Modifies the library URL (to add transformations)

    Prestashop

    Cloudimage Prestashop module

    The Cloudimage Prestashop Module will automatically adapt the image URLs in your Prestashop Theme to deliver your images rocket fast over the Cloudimage multi-CDN infrastructure. You only need to register with Cloudimage and install the plugin in your Prestashop Admin.

    Installation

    Prerequisites

    First, you need to have a Cloudimage account. You can create one on the .

    Step 1. Install the module

    Manual installation - download and unzip the module

    • Download the latest version

    • Unzip the file and change the folder name to "cloudimage"

    • Zip the file with the name "cloudimage.zip"

    • In Admin go to Modules/Module Manager -> Upload the Zipped file

    Automated installation - find the module in the marketplace

    • In Admin go to Modules/Module Catalog search for "Clouldimage by Scaleflex"

    • Click "Install"

    Step 2. Configure the module

    • Go to Modules/Module Manager -> Other Section -> Click on Configure on "Cloudimage by Scaleflex"

    • Update configuration and activate the Module, then your site is ready to go. (Please clear the Cache)

    Configuration

    • Activation: Enable/Disable the module

    • Cloudimage API Key: Your Cloudimage Token

    • Prerender: If enabled, the plugin will disable JS Responsive and Change URL to {token}.cloudimg.io/{origin_url}

    • Auto Base URL Image: If enabled, Production with SSL only, The Plugin auto add base url to some missing Base URL Images

    Advanced User

    • Custom JS Function: The valid js function starting with { and finishing with }

    • Custom Library Options: Modifies the library URL and must begin with the symbol &. Please read document before use.

    Please note: if you are using an earlier version of Prestashop (v1.6.x or less) and / or this plugins is not compatible with some of your add-ons, it is always possible to make a manual integration of the Cloudimage acceleration, following the .

    Akeneo

    Scaleflex VXP Akeneo App

    How does it work?

    Once installed and connected, Cloudimage by Scaleflex seamlessly enhances your Akeneo product images through real-time image optimization and CDN delivery.

    Here’s how it works:

    1. Image Fetching: Cloudimage fetches your original product images directly from Akeneo via secure URLs. You can choose between public or authenticated (Basic Auth) endpoints for accessing media.

    2. Image Optimization on the Fly: Each image is processed in real-time via the Cloudimage CDN. Optimization includes automatic WebP/AVIF conversion, resizing, cropping, quality tuning, and lazy loading – all based on your configuration or URL parameters.

    3. Delivery through a Global CDN: Optimized images are delivered via Cloudimage’s ultra-fast global CDN. This ensures instant load times, performance gains, and bandwidth savings for your PIM users, storefronts, or connected systems.

    4. Smart Caching & Transformation Control: All transformations are cached at edge locations, and you remain in full control of presets, filters, and security (token-based protection, signed URLs, etc.).

    5. Compatible with Headless & Omnichannel Setups: Whether you are delivering images to a traditional storefront or a headless frontend (React, Vue, etc.), Cloudimage ensures every product image is delivered in the right format, size, and quality – instantly.

    Limitation

    Once the application is activated, the access token is displayed only once for security reasons. If you leave or refresh the page without copying the token, it will no longer be accessible.

    In such a case, you will need to re-activate the app in order to generate a new access token.

    We recommend copying and storing the token securely immediately after activation to avoid any disruption.

    Introduction

    Scaleflex DMO, integrated with Akeneo, enables seamless management, optimization, and distribution of images, videos, and digital assets across all channels. Assets are automatically standardized, compressed, enriched with metadata, and delivered via CDN — enhancing visual performance and accelerating time-to-market.

    Installation & Activation

    Prerequisites

    • You need an active DMO account. if you don't already have one.

    Activation

    • Log in to your Akeneo instance

    • Go to Connect - App store, search by name: "Scaleflex", App name: "Cloudimage by Scaleflex"

    • Click Connect: You will grant all permissions for the Akeneo App

    • When activation is done, you will be redirected to the "Scaleflex DMO Success Connected"

    Configurations

    In the "Scaleflex DMO Success Connected", follow the steps in the guide:

    • Step 1: Copy the Access Token

    • Step 2: Open the Cloudimage Admin

      • Click on the button "Open Cloudimage Admin Config"

      • Go to the "Headers" block and fill in the value. Name: Authorization | Value:

    When all the configuration is correct, the result will be like this.

    How to use Cloudimage in Akeneo

    To use Cloudimage when all are connected, you need to get the product media download link

    Use in HTML:

    Shopware

    Cloudimage Shopware module

    Installation

    Prerequisites

    To use the plugin, you need to have a Cloudimage account. You can create one on the Cloudimage registration page.

    Step 1. Download and install the module

    Installation from Github

    • Step 1: Download the latest version

    • Step 2: Zip the file with the name "cloudimage.zip"

    • Step 3: In Admin go to Extensions -> My extensions -> Upload extension

    Or Installation from Store

    • Step 1: In Admin go to Extensions -> Store -> Catalog and search for "Cloudimage by Scaleflex"

    • Step 2: Click on extension and after that "Add extension"

    • Step 3: Go to Extensions -> My extensions -> Cloudimage by Scaleflex -> Click on Configuration

    • Step 4: Update configuration and activate the Module, then your site is ready to go.

    Step 2. Configure the module

    • Activation: Enable/Disable the module

    • Standard Mode: Replace image URLs not using any Javascript or Javascript library.

    • Token or CNAME: Please enter your cloudimage token here (eg: abcdefgh), or your complete CNAME (eg. media.company.com) if the configuration is already validated in your Cloudimage Admin.

    Advanced User's options

    • Custom JS Function: The valid js function starting with { and finishing with }

    • Custom Library Options: Modifies the library URL (to add transformations)

    Prestashop tutorial

    Implement Cloudimage on Prestashop 1.6+

    This simple and fast implementation in Prestashop leverages JPEG optimisation, WebP compression and CDN delivery of your images. Contact us if you want to use Cloudimage at its full extend and also resize, watermark, transform and leverage responsive images on your Prestashop store.

    Please note that to use your Cloudimage account with Prestashop, you need to use the Origin URL prefix function. This means that you will be able to use your Cloudimage token for delivering images only from your Prestashop site.

    Installation

    Prerequisites

    To use the plugin, you need to have a Cloudimage account. You can create one on the .

    Step 2. Configure the Cloudimage for use with Prestashop

    There are two basic configuration steps:

    1. First, you need to contact us at [email protected] and let us know that you would like to use your Cloudimage token with Prestashop. We will lock your account to the v7 API of Cloudimage. Note: This step is required only for tokens created before November 1, 2021.

    2. Then, you need to set up the Origin URL prefix in your Cloudimage admin to your Prestashop domain. By doing this, your token will fetch images only from your Prestashop site.

    Step 3. Log in to your Prestashop website admin

    Step 4. On the Admin sidebar, go to Advanced Parameters > Performance.

    Add in Media Server #1, the Cloudimage domain and click to Save.

    Step 5. Clear the cache.

    Verify your HTML page source

    Please ensure that you are properly delivering static content via the CDN.

    You can modify your template to resize your images with us

    This simple and fast implementation in Prestashop leverages JPEG optimisation, WebP compression and CDN delivery of your images. Contact us if you want to use Cloudimage at its full extent and also resize, watermark, transform and leverage responsive images on your Prestashop store.

    Presets

    Save combinations of commonly used image and video transformations in Presets

    Cloudimage Presets are reusable templates of assets transformations that you can apply to any image or video for consistent results with a single click.

    If you wish to apply the same transformations on many assets, you can define Presets (p) and apply transformations only using the Preset name (X).

    p=X

    All and can be included in a Preset, as well as and parameters.

    You can find all your Presets in the admin panel, Settings / Image Settings / Presets.

    Opencart

    Cloudimage Opencart plugin

    The Cloudimage Opencart Plugin will automatically adapt the image URLs in your Opencart site to deliver your images rocket fast over the Cloudimage multi-CDN infrastructure. You only need to register with Cloudimage and install the plugin in your Opencart Admin.

    Installation

    URL sealing

    Secure part of your Cloudimage URLs against tampering

    To prevent your customer from removing certain parameters, you can seal them. For example, if you don't want your users to get the image without a watermark or a certain filter, you can use the URL sealing feature. This system is similar to the feature but it is only sealing the ci_eqs parameters and allows you to add more filters and operations to the URL without re-generating the signature. This method is compatible with the .

    Please be aware that when URL sealing is activated for your token, all Cloudimage URLs that are not signed properly will cease to work.

    The signature is calculated as follows:

    Signature = sha1('URI' + 'ci_eqs' + 'Salt') where URI = original_image_url and ci_eqs = value of the content of ci_eqs query string

    Responsive images JS plugin

    Javascript implementation for pixel perfect design

    Responsive images libraries adapt the image size according to the screen or container size of the end user, thereby allowing websites and mobile apps to load faster across various screen sizes.

    For example, on an iPhone, Cloudimage will deliver smaller images than it would on a 24" desktop computer screen, thus accelerating the page loading time.

    Managing a responsive site manually can be tedious, especially for a site with more than a handful of images needing to be displayed on the ever-growing number of different devices & various screen-sizes. Therefore, the Cloudimage team has developed a JS plugin to automate everything for you. Check it out as well as a .

    For a good intro to Responsive Images, read through our blog article on .

    Cropfit

    Automatic crop or fit based on origin dimensions

    Performs either or depending on the origin image and the desired transformation dimensions.

    If the desired image is smaller than the original, the result is cropped to achieve the desired dimensions.

    func=cropfit

    Examples

    Preview

    Kontent.ai

    Cloudimage Kontent.ai connector

    Installation

    Prerequisites

    You need to have a Kontent CMS setup.

    Rules

    Apply transformation rules based on url pattern

    Cloudimage lets you define transformation rules based on image path and filename pattern matching.

    All and can be included in a rule, as well as and parameters.

    Defining rules

    You can define your presets in the admin panel, Image Settings / Rules.

    CDN basics

    Cloudimage caching and invalidation

    Cloudimage leverages Content Delivery Networks to accelerate the delivery of your images worldwide. We work with multiple CDN providers to optimise the delivery of your images and provide superb reliability.

    In addition to accelerating your images, the CDN provides DDoS (Distributed Denial of Service) protection, which will act as a shield to your servers and avoid any downtime.

    CDNs cache images for faster delivery. They usually keep assets cached as long as it is stated in . When the original image changes, the CDN won’t automatically detect that, so you need to either change the image URL or invalidate the cached version.

    Invalidation

    To refresh your images, you can either update the Cloudimage URL or invalidate them to flush them from the resizing servers and the CDN.

    Use origin URL: If enabled, the module will only add query parameters to the image source URL without prefixing it with {token}.cloudimg.io.
  • Lazy Load: If enabled, only images close to the current viewpoint will be loaded.

  • Ignore SVG Size: If enabled, the module will ignore the image size node in the SVG file.

  • Image Size Attributes: Used to calculate width and height of images

  • Prevent Image Upsize: If you set Maximum "Pixel ratio" equal to 2, but some of your assets does not have min retina size(at least 2560x960), please enable this to prevent image resized. By default, yes.

  • Image Quality: The smaller the value, the more your image will be compressed. Careful — the quality of the image will decrease as well. By default, 90.

  • Maximum Pixel Ratio: The maximum pixel ratio of the image. By default, 2.

  • Remove V7: If enabled, the module will remove the "/v7" part in URL format. Activate for token created after October 20th 2021.

  • Download Latest release of the Module

    Use origin URL: If enabled, the plugin will only add query parameters to the image source URL, avoiding double CDNization in some cases, like if you have aliases configured.

  • Lazy Load: If enabled, only images close to the current viewpoint will be loaded.

  • Ignore SVG Size: If enabled, the module will ignore the image size node in the SVG file.

  • Prevent Image Resize: If you set Maximum "Pixel ratio" equal to 2, but some of your assets does not have min retina size(at least 2560x960), please enable this to prevent image resized. By default, yes.

  • Image Quality: The smaller the value, the more your image will be compressed. Careful — the quality of the image will decrease as well. By default, 90.

  • Maximum Pixel Ratio: The maximum pixel ratio of the image. By default, 2.

  • Remove V7: If enabled, the module will remove the "/v7" part in URL format. Activate for token created after October 20th 2021.

  • Cloudimage registration page
    Download Latest release of Module
    Prestashop tutorial
    Use origin URL: If enabled, the module will only add query parameters to the image source URL without prefixing it with {token}.cloudimg.io.
  • Lazy Load: If enabled, only images close to the current viewpoint will be loaded.

  • Ignore SVG Size: If enabled, the module will ignore the image size node in the SVG file.

  • Prevent Image Upsize: If you set Maximum "Pixel ratio" equal to 2, but some of your assets does not have min retina size(at least 2560x960), please enable this to prevent image resized. By default, yes.

  • Image Quality: The smaller the value, the more your image will be compressed. Careful — the quality of the image will decrease as well. By default, 90.

  • Maximum Pixel Ratio: The maximum pixel ratio of the image. By default, 2.

  • Remove V7: If enabled, the module will remove the "/v7" part in URL format. Activate for token created after October 20th 2021.

  • Download Latest release of Module
    Cloudimage registration page

    trim - more info

    /samples.scaleflex.com/birds.jpg?func=crop&w=600&h=310
    /samples.scaleflex.com/birds.jpg?w=600&h=410
    more info
    more info
    more info
    more info
    /samples.scaleflex.com/paris-salon2.jpg?w=500&h=430&gravity=west
    /samples.scaleflex.com/paris-salon2.jpg?w=500&h=430&gravity=east
    /samples.scalefelx.com/voyage-louis-vuitton.jpg?w=600&wat=1&wat_url=http://sample.li/louis-vuitton-logo-white.png&wat_scale=45&wat_gravity=southeast&wat_pad=15
    watermarks: any image or text overlay(s) as listed under Image watermarking.
    Image operations
    Image filters
    JS lib
    React,
    Angular
    //samples.scaleflex.com/gen.php?w=22
    //doc.cloudimg.io/samples.scaleflex.com%2Fgen.php%3Fw%3D22?w=400&ci_url_encoded=1
    <img src="https://token.cloudimg.io/https://samples.scaleflex.com/flat.jpg?operations&filters&watermarks" />
    <picture>
      <source media="(min-width: 650px)" srcset="/samples.scaleflex.com/flat.jpg">
      <source media="(min-width: 465px)" srcset="/samples.scaleflex.com/flat.jpg">
      <img src="img_orange_flowers.jpg" alt="Flowers" style="width:auto;">
    </picture>
    <picture>
      <source media="(min-width: 650px)" srcset="token.cloudimg.io/samples.scaleflex.com/flat.jpg?operations1&filters">
      <source media="(min-width: 465px)" srcset="token.cloudimg.io/samples.scaleflex..com/flat.jpg?operations2&filters">
      <img src="img_orange_flowers.jpg" alt="Flowers" style="width:auto;">
    </picture>
    nonehttps://freeaccessdemo.blob.core.windows.net/myfiles/Image%20with%20space%20in%20the%20name.jpg
    nonehttp://doc.cloudimg.io/https%3A%2F%2Ffreeaccessdemo.blob.core.windows.net%2Fmyfiles%2FImage%2520with%2520space%2520in%2520the%2520name.jpg%3Fv%3D13?w=600&ci_url_encoded=1
    encodeURIComponent( path ).replace( /%20/g, '%2520' )

    pixelate=X | f=pixelate:X | pixellate=X | f=pixellate:X

    pixelates the image into X-pixel-sized blocks

    blur=X | f=blur:X

    applies Gaussian blur

    sharp=X | f=sharp:X

    applies unsharp mask to sharpen the image

    blur_faces=X

    detects all faces in the image and applies blur to conceal them

    Brightness

    bright=X | f=bright:X

    adjusts the brightness of the image

    Contrast

    contrast=X | f=contrast:X

    adjusts the contrast of the image

    Saturate

    saturate=X | f=saturate:X

    adjusts the saturation of the image

    Grayscale

    gray=1 | f=gray | grey=1 | f=grey

    converts the image to a black and white one

    Color overlay

    colorize=X | colourise=X

    Separate parameters: /samples.scaleflex.com/ny_doc.jpg?bright=15&contrast=30&gray=1

    Concatenate into the f parameter: /samples.scaleflex.com/ny_doc.jpg?f=bright:15,contrast:30,gray

    applies a color overlay

    hex color code / color name

    Background (padding) color (for use with func=fit)

    bg_img_fit

    1

    Use blurred version of the video for background / padding (for use with func=fit)

    format

    auto (default) | mp4 | webm | h264.mp4 | h265.mp4 | vp9.webm

    Defines the video format

    bitrate

    10k..20000k | 1m..20m (ex.300k, 2m)

    Sets the compression bitrate (in kilobits or megabits per second)

    w

    >100

    Sets the target video width

    h

    >100

    Sets the target video height

    func

    crop (default) | fit | cropfit | bound | boundmin | cover

    Sets the resize function if both width and height parameters are provided

    Simple resize: /samples.scaleflex.com/waterfall-hd.mp4?w=400

    Crop function: /samples.scaleflex.com/waterfall-hd.mp4?w=400&h=300

    Fit function with blurred background: /samples.scaleflex.com/waterfall-hd.mp4?w=400&h=300&func=fit&bg_img_fit=1

    Sets the compression bitrate in kilobits or megabits per second. /samples.scaleflex.com/waterfall-hd.mp4?bitrate=1000k

    bg_color

    page to get the Access Token
    Access_Token
  • Step 3: Go back to the "Scaleflex DMO Success Connected" browser tab, enter your Cloudimage Token, and click on the button "Check The Result".

  • Register for a demo
    Defining new Presets

    ...using the Asset Variation Builder

    Most of the on-the-fly image transformations can be configured using the Asset Variation Builder, an in-line URL builder to preview each image transformation instantly.

    Imagine you’re preparing images for an e-commerce product page. With the Asset Variation Builder, you can:

    1. Open the image from the Preset Settings page.

    2. Apply transformations:

      • Crop to a square ratio (1:1) for consistency across product listings

      • Automatically center the crop on the model face

      • Define webp as the best forced format

    3. Preview in real time how the image will look once delivered.

    4. Save as a Preset called “E-commerce Hero”.

    Now, every product photo uploaded to Cloudimage can instantly use this Preset, ensuring all visuals share the same style, quality, and format — without manual edits or developer input.

    Presets can be previewed in the Cloudimage Asset Library in Asset Details / Variations

    ...using the documentation

    Visit the Transformations section of our documentation to discover all the available transformations you can use in Presets.

    Preset name
    Operations and filters
    Syntax
    Preview

    gallery_thumb

    w=250&h=250&gray=1

    gallery_medium

    w=450&h=300&radius=10&force_format=jpeg&q=85

    gallery_large

    You can use additional operations together with a preset. Here is an example:

    Preset name
    Operations and filters
    Syntax
    Preview

    red_ref_number

    w=400&h=200&wat=1&wat_gravity=northeast&wat_pad=10&wat_font=Arial-Black&wat_fontsize=18&wat_colour=660000

    Please note that an operation defined in any given preset cannot be overridden in the URL. For example, if a preset named small_img contains w=200, using /original_image_url?p=small_img&w=400 will still yield a 200-pixel-wide image.

    Image operations
    Image filters
    Image watermarking
    Image compression
    Prerequisites

    To use the plugin, you need to have a Cloudimage account. You can create one on the Cloudimage registration page.

    Step 1. Download the plugin

    To get the plugin, you need to open Opencart Extension Marketplace.

    Then, search for "Cloudimage" in the search bar.

    Select the Cloudimage by Scaleflex plugin and click on Download. The Download button will be available on the right side. This will download the .zip file.

    Step 2. Install the plugin in Opencart

    First, you need to log in to your Opencart Admin:

    Then, navigate to Extension->Installer.

    Click on "Upload" and upload the .zip file that you downloaded in the previous step:

    Step 3. Activate the module

    Navigate to Extensions->Modifications and select refresh in the Modification panel. Refresh button will be available on the top right corner as shown below:

    Navigate to Extensions->Extensions->Modules.

    Select Cloudimage from the list of modules and click on Edit.

    Enable the plugin and enter Cloudimage Token or CNAME

    You need to enter your Cloudimage account token which you have received upon account creation (step 1).If you need a CNAME please contact our sales team.

    After you enter your token and save the changes, the plugin will start to deliver your images via Cloudimage.

    Configure

    Options
    Descriptions

    Remove v7 from URL

    If your token/CNAME was created after 20th October 2021 you need to tick this option.This option will remove the "v7" part from image URLs.

    Enable debug image overlays

    For troubleshooting purposes to view details about resizing and compression. Note:This will print information over your images.

    Cloudimage image output quality

    To increase or decrease the quality of images delivered by cloudimage.Slide to the right to increase quality.

    Javascript Mode

    To turn on responsive images,this option makes use of . All img tags "src" is changed to "ci-src" .

    When Javascript Mode is active, make sure that no other module is overwriting the plugin's delivery with "ci-src" image source.

    The syntax to process an image is:

    //token.cloudimg.io/original_image_url?ci_eqs=Sealed_parameters&ci_seal=Signature

    The Salt string is a shared secret between you and Cloudimage and only you will be able to calculate the signature of your images.

    Activation

    Before activating URL sealing, please make sure that all Cloudimage URLs contain the proper signatures (see the Usage section below).

    To activate this feature, you need to navigate to Image Settings / Security and activate the URL security toggle.

    In the Add Security modal, you need to choose URL Sealing and place a string you will be using as salt when generating the sealed parameter signature.

    Usage

    Step 1. Encode the query string

    To watermark an image at the URL samples.scaleflex.com/birds.jpg with query string wat=1&wat_url=http://samples.scaleflex.com/louis-vuitton-logo-white.png&wat_scale=45&wat_gravity=southwest&wat_pad=15, you need to first base64-encode the query string:

    becomes

    d2F0PTEmd2F0X3VybD1odHRwOi8vc2FtcGxlLmxpL2xvdWlzLXZ1aXR0b24tbG9nby13aGl0ZS5wbmcmd2F0X3NjYWxlPTQ1JndhdF9ncmF2aXR5PXNvdXRod2VzdCZ3YXRfcGFkPTE1

    Step 2. Create the signature

    The signature has to be created by sha1-hashing the string 'URI' + 'ci_eqs' + 'Salt':

    The final signature is:

    a355cce069fbfb18a4c39113067bf626ead2ebab

    Step 3. Construct the URL

    //token.cloudimg.io/original_image_url?ci_eqs=Sealed_parameters&ci_seal=Signature

    The final URL becomes:

    https://demoseal.cloudimg.io/samples.scaleflex.com/birds.jpg?ci_eqs=d2F0PTEmd2F0X3VybD1odHRwOi8vc2FtcGxlLmxpL2xvdWlzLXZ1aXR0b24tbG9nby13aGl0ZS5wbmcmd2F0X3NjYWxlPTQ1JndhdF9ncmF2aXR5PXNvdXRod2VzdCZ3YXRfcGFkPTE1&ci_seal=a355cce069fbfb18a4

    Step 4. Use and extend the request

    You can use the URL as is or append more parameters to the query string:

    https://demoseal.cloudimg.io/samples.scaleflex.com/birds.jpg?ci_eqs=d2F0PTEmd2F0X3VybD1odHRwOi8vc2FtcGxlLmxpL2xvdWlzLXZ1aXR0b24tbG9nby13aGl0ZS5wbmcmd2F0X3NjYWxlPTQ1JndhdF9ncmF2aXR5PXNvdXRod2VzdCZ3YXRfcGFkPTE1&ci_seal=a355cce069fbfb18a4&w=700&h=700

    Any parameters that are included in the sealed portion cannot be overwritten in the URL. For example, if a watermark is activated with wat=1 and sealed, appending wat=0 in the URL will not remove the watermark:

    https://demoseal.cloudimg.io/samples.scaleflex.com/birds.jpg?ci_eqs=d2F0PTEmd2F0X3VybD1odHRwOi8vc2FtcGxlLmxpL2xvdWlzLXZ1aXR0b24tbG9nby13aGl0ZS5wbmcmd2F0X3NjYWxlPTQ1JndhdF9ncmF2aXR5PXNvdXRod2VzdCZ3YXRfcGFkPTE1&ci_seal=a355cce069fbfb18a4&wat=0

    URL signature
    Responsive images JS plugin
    The Cloudimage JS lib will adapt all your URLs automatically and offers built-in Responsive Design, Lazyloading, and many more features to make your website responsive and fast as well as add nice loading effects to your images

    Vanilla JS:

    React:

    React Native:

    code sandbox (tba)

    Angular:

    Vue.js:

    here
    demo
    Responsive Images
    Syntax

    Original image (650x500 pixels):

    Cropfit to 500x350:

    Original image (400x250 pixels):

    Cropfit to 500x350:

    Using cropfit with trim

    If you include the Trim operation in the URL, the image will be trimmed first (if possible) and then either cropped or fitted to the desired size.

    Examples

    Preview
    Syntax

    Original image:

    Cropfit + trim:

    Crop
    Fit
    Step 1. Add custom element

    Content model (left hand side) > Create new > Custom element (right hand side). You will then have the below view.

    Hosted code URL: https://scaleflex.cloudimg.io/v7/plugins/cloudimage-kontent/cloudimage.html?func=proxy

    Parameters are the information that Kontent-Cloudimage needs to accelerate your images. See below:

    note: "mgmtApiKey" is obtained from:

    Step 2. Create new content with this Kontent-Cloudimage Custom Element

    Content & asset (left hand side) > Create new > Chose type: Cloudimage. Chose add/remove some images, publish. You will then have the below view.

    After publishing, it will look like below. The URLs are Cloudimage accelerated.

    Step 3. Set up a preview

    Here, you can find a tutorial on how to set up a preview: https://kontent.ai/learn/tutorials/develop-apps/build-strong-foundation/set-up-preview/

    Go to Settings > API Keys. For this, you will definitely need your Project ID. You may also need your API Key (depends on what you want to do, but for simple things Project ID is enough).

    Write a client app that utilizes the Delivery API

    Recall that Kontent have 3 set of APIs that you can interact with

    Delivery APIs in plain HTTPS form can be taken from https://kontent.ai/learn/tutorials/develop-apps/get-started/postman-collection/ , imported into POSTMAN

    For the 3 content items that comes out of the box, Kontent already have an example client app, which we can imitate.

    • This example app was made by using React JS https://github.com/Kentico/kontent-sample-app-react

    • Hosted on Github Pages: https://kentico.github.io/kontent-sample-app-preview-react/{restof the URL}

    After writing and hosting your client app, go to Settings > Preview URLs and define your Preview URL formats.

    See how Kontent defined their preview URLS for their example app

    Codename, URLSlug & ItemId are obtained as follows:

    Once you done all the above, you can preview by clicking Preview

    Support

    • https://kontent.ai/community/ or https://kontent.ai/discord

    • https://scaleflex.zendesk.com/hc/en-gb/requests/new or [email protected]

    https://kontent.ai/
    Using Rules

    Examples

    Rule pattern
    Operations and filters

    -avatar.jpg

    func=crop&w=300&h=300&radius=max

    Here is an image using the rules from above:

    Preview
    Syntax

    Extending and overriding rules

    You can add additional operations together with a preset. If an operation or a filter already exists, the value provided in the URL will take precedence over the one in the rule. Here is an example:

    Rule pattern
    Operations and filters

    -avatar.jpg

    func=crop&w=300&h=300&radius=max

    Adding more parameters or overriding some of the parameters from above:

    Preview
    Syntax

    Image operations
    Image filters
    Image watermarking
    Image compression

    Option 1: add version parameter to the origin URL to force the CDN to download the new image

    Old image:

    //doc.cloudimg.io/sample.li/flat.jpg?w=500

    New image:

    //doc.cloudimg.io/sample.li/flat.jpg?w=500&vh=xx (where 'xx' represent random numbers)

    The vh parameter with any random value makes the URL unique and forces a cache refresh.

    Option 2: invalidate images from the Admin panel

    If you cannot change the image URLs when changing the origin image, you can still invalidate (flush) the image from the Cloudimage admin console. Log in to the console and navigate to Invalidation, or go to this page - https://admin.cloudimage.io/project/invalidation

    First, you need to select the scope of the Invalidation:

    • Original -> targets specific image URLs. Enter up to 10 URLs, separated by commas or line breaks.

    • All -> this option will erase the entire cache generated for your token. Please use it with caution, because after invalidation, the cache needs to be rebuilt, and your first requests would take more time for execution.

    Do not use the full path of your image but only the origin_image_url part as invalidation path. For example, to invalidate doc.cloudimg.io/sample.li/flat1.jpg?w=500, you need to input /sample.li/flat1.jpg.

    🟢 Correct format for invalidation: /sample.li/flat1.jpg 🔴 Incorrect formats for invalidation: /sample.li/flat1.jpg?w=500 doc.cloudimg.io/sample.li/flat1.jpg doc.cloudimg.io/sample.li/flat1.jpg?w=500

    This will remove the image(s) from all CDN nodes and Cloudimage resizing servers.

    When the Invalidation request is submitted, it appears in the Invalidation log. Both manual and automatic invalidations are logged there.

    Details of the Invalidation Log

    Every request has the following parameters:

    • Status - the status of the request:

      • Received - request received successfully

      • Preparing - the Invalidation server prepares the request for execution

      • Flushing Scaleflex servers - deleting the cache in the resizing servers

      • Flushing CDN servers - deleting the cache of the CDN servers

      • Done - the invalidation finished successfully

      • ERROR_CDN_NODE - error in the CDN invalidation step

      • ERROR - general error in some of the invalidation steps

    If you encounter ERROR or ERROR_CDN_NODE, click Retry or contact support. Please include the Invalidation ID in your message.

    • Scope - the scope of the request (original / all)

    • Date - the datetime when the request has been submitted for execution. The value is in the local time zone.

    • Invalidation ID - the unique identifier of the request.

    • Invalidation path - if you click on "See links", you can inspect which URLs have been requested for invalidation (applicable for the invalidations with scope "original")

    • Retry - resend the invalidation request if it failed.

    Click the Refresh button to reload the invalidation log and view the latest updates.

    Option 3: use the Invalidation REST API

    You can also automate invalidations by calling the Invalidation API. This is useful for developers managing large-scale projects or CI/CD workflows.

    the caching directive

    /samples.scaleflex.com/mountains.jpg?w=300

    /samples.scaleflex.com/mountains.jpg?h=300&w=300&gravity=smart

    /samples.scaleflex.com/hotel.jpg?h=300

    /samples.scaleflex.com/hotel.jpg?h=300&w=300&gravity=smart

    /samples.scaleflex.com/boat.jpg?h=300

    /samples.scaleflex.com/boat.jpg?h=300&w=300&gravity=auto

    /samples.scaleflex.com/classroom.jpg?h=300&w=300&gravity=face

    use watermark

    wat=1

    (required) Activates the watermark function

    watermark text

    wat_text=X

    (required) The text to be overlayed. Can be URL-encoded

    watermark gravity

    wat_gravity=X X=[north|south][east|west]|center| absolute|relative

    Defines the position to "anchor" the watermark to

    watermark padding

    wat_pad=X[p][,Y[p]] X/Y=0..100[p]

    Adds padding from the anchoring point in pixels (X) or in percent (Xp)

    watermark position

    wat_pos=X[,Y]

    sets the position in percent from the resized image; works only with wat_gravity=absolute and wat_gravity=relative

    watermark opacity

    wat_opacity=X X=0..1

    Defines watermark opacity

    watermark font

    wat_font=X

    Choose the font family for the overlay

    watermark color

    wat_color=X | wat_colour=X

    Sets the text color

    watermark font size

    wat_fontsize=X | wat_fontsize=Xmax

    Sets the font size. If the Xmax syntax is used, the size is reduced if the text cannot fit in the image

    /samples.scaleflex.com/flat1.jpg?w=550&wat=1&wat_gravity=northeast&wat_text=REF00189300B&wat_pad=10&wat_font=Arial-Black&wat_fontsize=18&wat_color=660000

    Text too long for the image: /samples.scaleflex.com/flat1.jpg?w=400&wat=1&wat_gravity=north&wat_text=A%20VERY%20LONG%20TEXT%20WHICH%20WON%27T%20FIT&wat_pad=10&wat_font=Arial-Black&wat_fontsize=20&wat_color=000

    Text size limit set with wat_fontsize=20max: /samples.scaleflex.com/flat1.jpg?w=400&wat=1&wat_gravity=north&wat_text=A%20VERY%20LONG%20TEXT%20WHICH%20WON%27T%20FIT&wat_pad=10&wat_font=Arial-Black&wat_fontsize=20max&wat_color=000

    /samples.scaleflex.com/kids.jpg?tl_px=900,100&br_px=1300,550
    /samples.scaleflex.com/kids.jpg?br_px=890,560
    /samples.scaleflex.com/kids.jpg?x=650&y=100
    /samples.scaleflex.com/kids.jpg?w=200&tl_px=900,0&br_px=1300,600
    /samples.scaleflex.com/kids.jpg?w=800&h=270&tl_px=310,70&br_px=1550,580&func=fit&bg_color=3498db

    Static watermark

    Statically defined image overlay

    This function will watermark selected images with the same watermark - an image set in the Cloudimage admin console. This is useful for placing your company logo, name, or other copyright information. If you would like to watermark different images with different watermarks, please refer to the Dynamic watermark section.

    Step 1. Upload your watermark

    Log in to your Cloudimage admin console, navigate to Image Settings / Watermark, and upload your default watermark using the uploader.

    Step 2. Start watermarking!

    Available parameters

    Parameter
    Syntax
    Description

    Use watermark

    To activate the watermark function, you need to include the wat=1 parameter.

    Watermark gravity

    The wat_gravity parameter allows you to define the position of the watermark. You can choose between "fixed" anchor points (east, northeast, north, northwest, west, southwest, south, southeast, and center) or define the exact position (relative, absolute).

    When using "compass" point gravity, the wat_pad parameter defines the offset from the chosen position. The padding can be defined in pixels (wat_pad=X[,Y]) or in percent of output size (wat_pad=Xp[,Yp]). The padding is applied after scaling the final image and then it is compressed (see Compression) and delivered via CDN.

    To set the exact position of the watermark, you can choose absolute or relative gravity and use the wat_pos parameter to define the position of the top left or center point of the watermark, respectively. The position is always defined in percent of the resized image dimensions.

    Watermark size

    The watermark can be scaled relative to the original watermark image (wat_scale=X) or relative to the output image (wat_scale=Xp).

    To keep the watermark-to-image proportions for all image resizes, you should use the wat_scale=Xp.

    Please note that the watermark cannot be larger than the image - if larger, it is always scaled down first to match the image dimensions. Then, the wat_scale parameter values are applied.

    Examples

    Preview
    Syntax

    Aspect ratio crop

    Crop by aspect ratio or aspect ratio range

    Sets target aspect ratio or aspect ratio range when cropping. Aspect ratios can be set as decimal values (1.778) or ratios (16:9).

    aspect_ratio=AR | ar=AR

    aspect_ratio=AR1,AR2 | ar=AR1,AR2

    Crop and resize

    If you provide only one dimension parameter (width or height) and aspect_ratio, the other dimension will be calculated. If you include both width and height in the URL, aspect_ratio is ignored.

    Examples

    Crop without resize

    If you provide only aspect_ratio and no dimensions (width or height), the image will be cropped without resizing.

    Examples

    Preview
    Syntax

    Aspect ratio range

    You can specify a range of aspect ratio values, for example, aspect_ratio=4:3,16:9. Images that fall within this range, will not be cropped. Useful to avoid very wide or very tall images by cropping them to the closest aspect ratio.

    Examples

    Image watermarking

    Compose image or text layers over the main image

    Cloudimage can place a watermark on top of your images if you want to protect them from copying or tag them with a serial number or custom text. There are three types of watermarks - click on each one for more details.

    Most of the on-the-fly image transformations can be configured using the Asset Variation Builder, an in-line URL builder to preview each image transformation instantly.

    Apply the same image watermark to all the images you decide to watermark (e.g. your company's logo).

    Specify the watermark in the Cloudimage URL to apply different watermarks to different images.

    If you need to tag images, use the text watermark to dynamically embed text to the images you need tagged.

    Multiple watermarks

    Basic syntax

    You can overlay multiple watermarks by indexing the parameters in the URL wat[1]=1&wat[2]=1. The wat=1 parameter must be indexed and contain all watermarks to activate the feature.

    All parameters without indices will be applied to all watermarks in the image.

    ?wat[1]=1&wat[2]=1&wat_scale[1]=50&wat_scale[2]=10&wat_opacity=0.5

    In the above fragment, wat_opacity=0.5 will be applied to both watermarks.

    Multiple watermark types

    Combining multiple watermark types is also possible.

    Remember that the presence of the wat_url=X parameter defines a dynamic watermark, wat_text=X defines a text watermark and the absence of either defines a static watermark.

    ?wat[1]=1&wat[2]=1&wat[3]=1&wat_url[2]=sample.li/Angular.png&wat_text[3]=text

    In the above fragment, there are three watermarks. Watermark 2 is a dynamic watermark, watermark 3 is a text watermark, and watermark 1 is a static one.

    Example

    Preview
    Syntax

    Ruby wrapper

    The Ruby wrapper allows you to seamlessly interface with the Cloudimage API.

    Supported with Ruby 2.4+, JRuby, and TruffleRuby

    Installation

    Add this line to your application's Gemfile:

    And then execute:

    Or install it yourself as:

    Usage

    The only requirement to get started is your customer token. You can find it within your Admin interface.

    In order to interact with Cloudimage, we'll first initialize a client service object:

    The Cloudimage client accepts the following options:

    Option
    Type
    Additional info

    The calling path on the client object returns an instance of Cloudimage::URI. It accepts the path to the image as a string and we we will use it to build Cloudimage URLs.

    Here are some common approaches for constructing Cloudimage URLs using this gem:

    Hash of params

    Pass a hash to to_url. Every key becomes a param in the final Cloudimage URL so this gives you the freedom to pass arbitrary params if need be.

    Chainable helpers

    Every param supported by Cloudimage can be used as a helper method.

    While every key passed into the to_url method gets appended to the URL, chainable helper methods will throw a NoMethodError when using an unsupported method.

    This is useful for catching typos and identifying deprecated methods in case Cloudimage's API changes.

    Method aliases

    The gem comes with a handful of useful aliases. Consult the Cloudimage::Params module for their full list.

    From the example above you can see that parameters that only serve as a flag don't need to accept arguments and will be translated into param=1 within the final URL.

    For the full set of parameters and detailed implementation instructions, please consult the .

    <img src="https://{token}.cloudimg.io/{akeneo_product_media_download_link}">
    base64('wat=1&wat_url=http://samples.scaleflex.com/louis-vuitton-logo-white.png&wat_scale=45&wat_gravity=southwest&wat_pad=15')
    sha1('samples.scaleflex.com/birds.jpg' + 'd2F0PTEmd2F0X3VybD1odHRwOi8vc2FtcGxlLmxpL2xvdWlzLXZ1aXR0b24tbG9nby13aGl0ZS5wbmcmd2F0X3NjYWxlPTQ1JndhdF9ncmF2aXR5PXNvdXRod2VzdCZ3YXRfcGFkPTE1' + 'salt')
    json{
        "token": "your_token",
        "baseURL": "your_base URL",
        "lazyLoading": true/false,
        "mgmtApiKey": "your Management API key",
    }
    gem 'cloudimage'
    $ bundle install
    demo page
    github
    code sandbox
    demo page
    github
    code sandbox
    github
    demo page
    github
    code sandbox
    demo page
    github
    code sandbox
    /samples.scaleflex.com/classroom.jpg
    /samples.scaleflex.com/classroom.jpg?func=cropfit&w=500&h=350&bg_color=auto
    /samples.scaleflex.com/ny_doc.jpg
    /samples.scaleflex.com/ny_doc.jpg?func=cropfit&w=500&h=350&bg_color=auto
    /samples.scaleflex.com/sofa.jpg
    /samples.scaleflex.com/sofa.jpg?func=cropfit&trim=0&w=500&h=350&bg_colour=auto
    //samples.scaleflex.com/user-78745-avatar.jpg
    /samples.scaleflex.com/user-78745-avatar.jpg
    /samples.scaleflex.com/user-78745-avatar.jpg?gray=1
    /samples.scaleflex.com/user-78745-avatar.jpg?radius=50
    Pixelate
    Blur
    Sharpen
    Face blur
    Cloudimage javascrpt libarary
    WebP format
    JPEG compression
    PNG format

    integer

    Optional. Integer value in the range 6..40. Defaults to 18.

    sign_urls

    boolean

    Optional. Defaults to true. See Security.

    aliases

    hash

    Optional. See URL aliases.

    token

    string

    Required if cname is missing.

    cname

    string

    Required if token is missing. See CNAME.

    salt

    string

    Optional. See Security. Needed if you are using URL sealing or URL signatures.

    github page
    github

    signature_length

    $ gem install cloudimage
    client = Cloudimage::Client.new(token: 'mysecrettoken')
    uri = client.path('/assets/image.png')
    uri.to_url(w: 200, h: 400, sharp: 1, gravity: 'west', ci_info: 1)
    # => "https://mysecrettoken.cloudimg.io/assets/image.png?ci_info=1&gravity=west&h=400&sharp=1&w=200"
    uri.w(200).h(400).gravity('west').to_url
    # => "https://mysecrettoken.cloudimg.io/assets/image.png?gravity=west&h=400&w=200"
    uri.height(200).to_url
    # NoMethodError (undefined method `height' for #<Cloudimage::URI:0x00007fae461c42a0>)
    uri.debug.prevent_enlargement.to_url
    # => "https://mysecrettoken.cloudimg.io/assets/image.png?ci_info=1&org_if_sml=1"

    wat_scale=Xp X=0..100p

    Watermark image scaling defined in in percent of the output image dimensions

    watermark padding

    wat_pad=X[p][,Y[p]] X/Y=0..100[p]

    Adds padding from the anchoring point in pixels (X) or in percent (Xp)

    watermark positon

    wat_pos=X[,Y]

    sets the position in percent from the resized image; works only with wat_gravity=absolute and wat_gravity=relative

    watermark opacity

    wat_opacity=X X=0..1

    Defines watermark opacity

    Absolute positioning - the top left corner of the watermark is position at 7% and 5% of the image width and height, respectively:

    use watermark

    wat=1

    (required) Activates the watermark function

    watermark gravity

    wat_gravity=X X=[north|south][east|west]|center| absolute|relative

    Defines the position to "anchor" the watermark to

    watermark scaling (relative to original watermark size)

    wat_scale=X X=0..100

    Watermark image scaling defined in in percent of the watermark dimensions

    /samples.scaleflex.com/earth1.jpg?w=400&h=240&wat=1&wat_scale=30&wat_gravity=northwest&wat_pad=10,8

    /samples.scaleflex.com/boat.jpg?w=400&wat=1&wat_scale=80&wat_gravity=center&wat_opacity=0.2

    /samples.scaleflex.com/ny_doc.jpg?w=400&wat=1&wat_scale=45&wat_gravity=north&wat_pad=0p,5p

    Watermark scaled down to 45% of its original size (1178px), results in 530px watermark: /samples.scaleflex.com/tesla.jpg?w=1400&wat=1&wat_gravity=southwest&wat_scale=45&wat_pad=15

    Watermark scaled relative to the output image dimensions (618px watermark): /samples.scaleflex.com/tesla.jpg?w=1400&wat=1&wat_gravity=southwest&wat_scale=45p&wat_pad=15

    watermark scaling (relative to output image size)

    w=1200&force_format=jpeg&optipress=2&wat=1&wat_gravity=northwest&wat_scale=60&wat_pad=20&wat_opacity=0.4

    /samples.scaleflex.com/birds.jpg?p=gallery_large

    /samples.scaleflex.com/birds.jpg?p=gallery_thumb
    /samples.scaleflex.com/birds.jpg?p=gallery_thumb
    /samples.scaleflex.com/flat1.jpg?p=red_ref_number&wat_text=label1

    Original aspect ratio (3:2 or 1.5): /samples.scaleflex.com/car1.jpg?w=400

    Cropped to 1.8: /samples.scaleflex.com/car1.jpg?w=400&aspect_ratio=1.8

    Original aspect ratio (1.323): /samples.scaleflex.com/frog.png

    Cropped to 3:2 (1.5): /samples.scaleflex.com/frog.png?aspect_ratio=3:2

    Original aspect ratio 1.5: /samples.scaleflex.com/car1.jpg?w=400

    Aspect ratio range 1.5..2 (no crop needed): /samples.scaleflex.com/car1.jpg?w=400&aspect_ratio=1.5,2.0

    Original aspect ratio 2.25:1 (2.25): /samples.scaleflex.com/kids.jpg?w=400

    Aspect ratio range 3:2..2:1 (1.5..2): /samples.scaleflex.com/kids.jpg?w=400&aspect_ratio=3:2,2:1

    /samples.scaleflex.com/paris-salon2.jpg?w=600&wat[1]=1&wat[2]=1&wat[3]=1&wat_pad=6&wat_url[1]=http://sample.li/Angular.png&wat_url[2]=http://sample.li/React.png

    Static watermark
    Dynamic watermark
    Text watermark

    Fit

    Fits the image in a box with padding when needed

    Resizes the image to fit into a specified width and height box, adds padding (image or solid color) to keep proportions, and delivers the resulting image via CDN.

    func=fit

    Please note that by default, smaller images will not be upscaled to fit the box. If you want to enable this behavior, you need to use fit_enlarge=1. along with func=fit.

    The padding can be customized using the following additional operations:

    Operation
    Syntax
    Description

    Gravity

    When using func=fit along with (trim=X), you can set gravity=trim. This way, upon a successful trim, the gravity will be resolved to a compass position so that the canvas will not be extended on the non-trimmed edges.

    Margin

    margin=X

    If only one value is provided (margin=X), this sets the same minimum margin for all four edges. When two values are provided (margin=V,H), this sets the vertical (top and bottom) and horizontal (left and right) margins. If four values are listed (margin=N,E,S,W), they refer to the four image edges - north (top), east (right), south (bottom) and west (left).

    By default, the margin is defined in pixels and applied before resizing. Alternatively, you can also use percentages (eg. margin=5p) of the destination size or absolute values in pixels (margin=100a) to define the margins.

    When using a margin alongside trim=X and gravity=trim, if a successful trim is performed, the margins on the non-trimmed side is removed. For more details, see the operation.

    Examples

    Preview
    Syntax

    Image formats

    Supported output image formats

    JPEG compression

    The JPEG compression format is suitable for delivering photographic images with minimal quality loss and a high compression rate. You can either choose the compression factor yourself or use Optipress - our Machine Learning algorithm, which will choose the best way to reduce JPEG file size minimizing perceptual quality loss.

    Available parameters

    Examples

    Preview
    Syntax

    PNG format

    This format is a good choice for non-photographic images - flowcharts, graphs, screenshots, logos, etc. PNG also supports transparency.

    Available parameters

    Lossy PNG compression

    While the PNG format offers lossy compression only, Cloudimage can optimize the image before compression by reducing the number of colors or adding slight dithering (while preserving edges). This method usually leads to smaller file sizes for images visually indistinguishable from the original ones.

    You can activate this feature in the Admin Console (Image Settings/Compression):

    Examples

    Preview
    Syntax

    WebP format

    WebP is an image format maintained by Google and supported in certain browsers (mainly Chrome, Opera, and Chrome Android) which provides more aggressive compression techniques as JPG without noticeable quality degradation.

    By default, automatic WebP transcoding is deactivated. If you choose to activate it, all images will be delivered as WebP. If the client's browser does not support this format, JPEG or PNG (if the image has an alpha channel) is used instead.

    You can use the following parameters to control WebP compression quality:

    Examples

    Preview
    Syntax

    Deliver images in their original format

    By default, Cloudimage delivers the images in the format which will lead to the fastest delivery, while being supported by the requesting browser, as for exemple a WebP.

    But sometimes WebP will be heavier than the original image (eg. a low resolution .JPG might be lighter than the same image .WEBP), so cloudimage will ignore the transformation process and provide the original format (when the original format is supported by the browser of course).

    If you would like to systematically activate this function and always keep the format of the original image, you can use force_format=original

    Sylius

    Cloudimage Sylius Plugin

    The Cloudimage Sylius Plugin will automatically adapt the image URLs in your Sylius site to deliver your images rocket fast over the Cloudimage multi-CDN infrastructure. You only need to register with Cloudimage and install the plugin in your Sylius Admin.

    Installation

    Theme files

    Shopify integration - theme files

    You need to adapt your individual theme files for the image URLs to be changed to Cloudimage URLs. Identify first which theme files are used by your shop and edit them one by one as detailled below.

    Backup your theme files. Before making changes in these files, it is recommended that you download and save them securely to be able to restore them later in case of error.

    Here are a couple of examples indicating the change that needs to be made in the theme files. You can follow similar steps to change all of your theme files. List of some files that need to be changed (files may vary between themes):

    /samples.scaleflex.com/earth1.jpg?w=400&h=240&wat=1&wat_scale=30&wat_gravity=absolute&wat_pos=7,5
    &
    wat_gravity[
    1
    ]=southeast
    &
    wat_gravity[
    2
    ]=southwest
    &
    wat_scale=25
    &
    wat_text[
    3
    ]=TEXT%20WATERMARK
    &
    wat_fontsize[
    3
    ]=20
    &
    wat_gravity[
    3
    ]=north
    &
    wat_color[
    3
    ]=blue
    featured-product.liquid
  • product-template.liquid

  • collection-grid-item.liquid

  • Product-grid-item.liquid

  • header.liquid

  • video.liquid

  • As general what you need to do is:

    • assign new variable inheriting the original theme image url

    • replace the old image invocation with inclusion of cloudimage

    Example 1

    You can make the changes inside product-template.liquid.

    Before:

    After:

    Example 2

    Before:

    After:

    Example 3

    Before:

    After:

    Example 4

    Before:

    After:

    Example 5 - with capture

    If there is a tag inside image URL and you cannot simply assign it, use capture

    Before:

    After:

    Example 6 - Video

    Before:

    After:

    You can also take a look at the FAQ section.

    <img id="{{ img_id }}"
                    class="product-single__photo lazyload{% unless featured_image == image %} lazypreload{% endunless %}{% if section.settings.product_image_zoom_type == 'lightbox' %} lightbox{% endif %}"
                    {% if section.settings.product_image_zoom_type == 'zoom-in' %} data-zoom="{{ image | img_url: '1024x1024' }}"{% endif %}
                    src="{{ image | img_url: '200x200' }}"
                    data-src="{{ img_url }}"
                    data-widths="[180, 360, 470, 600, 750, 940, 1080, 1296, 1512, 1728, 2048]"
                    data-aspectratio="{{ image.aspect_ratio }}"
                    data-sizes="auto"
                    alt="{{ image.alt | escape }}">
    Explained changes:
    We assign new variables for every URL usage from the original theme file (visible above)
    using 
    {% assign meaningfull_name = the_entire_value_used_in_the_original_request %}
    
    For example: src="{{ image | img_url: '200x200' }}"
    we create new variable that equals the old src "image | img_url: '200x200'" 
    {% assign old_img_src = image | img_url: '200x200' %}
    
    Now we replace the src="{{ image | img_url: '200x200' }}" with src="{% include 'cloudimage' src:old_img_src %}"
    Where wi replace the old value with {% include 'cloudimage' src:the_meaningful_name_we_assign_before_that %}-
    
    This way we get the chance to switch between the original image path and the optimised one by using the implemented Cloudimage enable/disable option
    Now we need to perform this change in all files that deliver image URLs being src, data-src, background-image, zoom-image
    {% assign old_img_src = image | img_url: '200x200' %}
    {% assign old_img_data_src = img_url %}
    {% assign old_img_data_zoom = image | img_url: '1024x1024' %}
    
            <img id="{{ img_id }}"
                 class="product-single__photo lazyload{% unless featured_image == image %} lazypreload{% endunless %}{% if section.settings.product_image_zoom_type == 'lightbox' %} lightbox{% endif %}"
                 {% if section.settings.product_image_zoom_type == 'zoom-in' %} data-zoom="{% include 'cloudimage' src:old_img_data_zoom %}"{% endif %}
                 src="{% include 'cloudimage' src:old_img_src %}"
                 data-src="{% include 'cloudimage' src:old_img_data_src %}"
                 data-widths="[180, 360, 470, 600, 750, 940, 1080, 1296, 1512, 1728, 2048]"
                 data-aspectratio="{{ image.aspect_ratio }}"
                 data-sizes="auto"
                 alt="{{ image.alt | escape }}">
    <noscript>
     <img src="{{ featured_image | img_url: 'grande' }}" alt="{{ featured_image.alt | escape }}">
    </noscript>
    <noscript>
     {% assign old_img_url = featured_image | img_url: 'grande' %}
     <img src="{% include 'cloudimage' src:old_img_url %}" alt="{{ featured_image.alt | escape }}">
    </noscript>
    <li class="grid__item {{ thumbnail_width }}">
     <a href="{{ image.src | img_url: 'grande' }}" class="product-single__thumbnail" data-image-id="{{ image.id }}">
       <img src="{{ image.src | img_url: 'compact' }}" alt="{{ image.alt | escape }}">
     </a>
    </li>
    <li class="grid__item {{ thumbnail_width }}">
     {% assign old_img_grande = image.src | img_url: 'grande' %}
     {% assign old_img_compact = image.src | img_url: 'compact' %}
     <a href="{% include 'cloudimage' src:old_img_grande %}" class="product-single__thumbnail" data-image-id="{{ image.id }}">
       <img src="{% include 'cloudimage' src:old_img_compact %}" alt="{{ image.alt | escape }}">
     </a>
    </li>
    {% if section.settings.product_image_zoom_type == 'lightbox' %}
     <ul class="gallery hidden">
       {% for image in product.images %}
         <li data-image-id="{{ image.id }}" class="gallery__item" data-mfp-src="{{ image | img_url: '2048x2048' }}"></li>
       {% endfor %}
     </ul>
    {% if section.settings.product_image_zoom_type == 'lightbox' %}
      <ul class="gallery hidden">
        {% for image in product.images %}
    
        {% assign old_data-mfp-src = image | img_url: '2048x2048' %}
          <li data-image-id="{{ image.id }}" class="gallery__item" data-mfp-src="{% include 'cloudimage' src:old_data-mfp-src %}"></li>
        {% endfor %}
      </ul>
    <img width="{{ image.width }}" height="{{ image.height }}" src="{{ image | img_url: '50x50' }}" class="lazyload attachment-shop_single size-shop_single sp-post-image" alt="{{image.alt}}" title="{{product.title}}"
    data-src="{{ img_url }}"
    data-large_image="{%-include 'gl_image_format',cache:true, src: image.src, size: product_image_photowipe -%}" data-large_image_width="{{ image.width }}" data-large_image_height="{{ image.height }}"
    data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" data-aspectratio="{{ image.aspect_ratio }}" data-sizes="auto">
    {% assign old_img_src = image | img_url: '50x50' %}
    {% assign old_img_data_src = img_url %}
    {% capture old_img_data_large_image %}
    {%-include 'gl_image_format',cache:true, src: image.src, size: product_image_photowipe -%}
    {% endcapture %}
    <img width="{{ image.width }}" height="{{ image.height }}" src="{% include 'cloudimage' src:old_img_src %}" class="lazyload attachment-shop_single size-shop_single sp-post-image" alt="{{image.alt}}" title="{{product.title}}"
    data-src="{% include 'cloudimage' src:old_img_data_src %}"
    data-large_image="{% include 'cloudimage' src:old_img_data_large_image %}" data-large_image_width="{{ image.width }}" data-large_image_height="{{ image.height }}"
    data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" data-aspectratio="{{ image.aspect_ratio }}" data-sizes="auto">
    {{ section.settings.video
      | video_tag:
        image_size: "1100x",
        autoplay: true,
        loop: section.settings.enable_video_looping,
        controls: true,
        muted: false
    }}
    {% assign old_video_url = section.settings.video.sources.first.url %}
    {% render 'cloudimage-video-tag', image_size: "1100x", autoplay: true, loop: loop, controls: true, url: old_video_url, muted: false %}

    bg_blur=X

    applies Gaussian blur to the background image

    bg_opacity=X X=0..1

    specifies background image opacity

    bg_colorize=X | bg_colourise=X

    defines a color to tint the background image

    bg_gravity=X X=[north|south][east|west]

    defines the positioning of the background image within its container

    image upscaling

    fit_enlarge=1

    allows upscaling smaller images to the desired dimensions (will result in inferior image resolution)

    Align Background image to left (west gravity):

    No upscaling of smaller images (default):

    Upscaling allowed:

    gravity

    gravity=X X=[north|south][east|west]

    sets the position of the image in the fit box

    margin

    margin=X

    defines a minimum margin when fitting the image in the new canvas

    solid background

    bg_color=X | bg_colour=X X={hex color}|auto

    defines a background color with a hex code, color name or automatically, based on the image palette

    blurred background

    bg_img_fit=1

    northwest

    north

    northeast

    west

    center | centre (default)

    east

    southwest

    south

    southeast

    trim - more info

    Solid background: /samples.scaleflex.com/hotel.jpg?w=400&h=245&func=fit&bg_color=000

    Automatic solid background: /samples.scaleflex.com/frog.png?func=fit&w=400&h=220&bg_colour=auto

    Blurred background: /samples.scaleflex.com/car1.jpg?w=400&h=320&func=fit&bg_img_fit=1&bg_opacity=0.75

    Blurred background, tinted: /samples.scaleflex.com/boat.jpg?func=fit&w=400&h=330&bg_img_fit=1&bg_opacity=0.5&bg_colorize=red

    Align Background image to right (east gravity): /samples.scaleflex.com/classroom.jpg?func=fit&width=600&height=600&q=70&bg_img_fit=1&bg_blur=15&bg_gravity=east&bg_colorize=lc000000&bg_opacity=0.5

    Trim

    sets blurred image background

    Prerequisites

    To use the plugin, you need to have a Cloudimage account. You can create one on the Cloudimage registration page.

    Step 1. Install and setup the plugin

    Open a command console on your Sylius hosting server, enter your project directory and execute the following command to download the latest stable version of this bundle:

    Then, enable the plugin by adding it to the list of registered plugins/bundles in config/bundles.php file of your project

    Update Channel Model Your Entity Channel has to implement \Scaleflex\SyliusCloudimagePlugin\Model\ExtendedChannelInterface

    You can use Trait \Scaleflex\SyliusCloudimagePlugin\Model\ExtendedChannelTrait

    Update Database Schema

    Include

    in your templates/bundles/SyliusAdminBundle\Channel_form.html.twig form.

    Then you can start to personalize the configuration (token, options) in Admin / Channel -> Choose one Channel

    Add script to Shop by Event

    Development

    To process your image through Cloudimage you have two ways to implement

    • Option 1: Use the ci_src(path) Twig Function

    • Option 2: Define your own

      • Update the image src to ci-src="{path}?q={sylius.channel.cloudimageImageQuality}"

      • Add the script

    Step 2. Configure the module

    Here are the available configuration options:

    Option
    descriptions

    Activation

    Enable/Disable the plugin

    Token

    Token from Cloudimage (found in your admin panel)

    Use origin URL

    If enabled, the module will only add query parameters to the image source URL without prefixing it with {token}.cloudimg.io : might be useful to avoid double CDNization, for exemple if you have aliases configured

    Ignore Image Size Node

    Useful for improving compatibility with some themes.

    Ignore Image Size Style

    Useful for improving compatibility with some themes.

    When Javascript Mode is active, make sure that no other module is overwriting the plugin's delivery with "ci-src" image source.

    Set format

    force_format=jpg

    forces using the JPEG image compression

    Quality

    q=X X=0..100

    the smaller the value of q, the more your image will be compressed. Be careful - the quality of the image will decrease as well.

    Optipress

    optipress=X X=1..3

    chooses the best compression approach maintaining visual quality via the Optipress algorithm

    q=85, filesize 204 kB: /samples.scaleflex.com/woman_dress.jpg?force_format=jpeg&q=85 q=75, filesize 129 kB: /samples.scaleflex.com/woman_dress.jpg?force_format=jpeg&q=75 q=65, filesize 102 kB: /samples.scaleflex.com/woman_dress.jpg?force_format=jpeg&q=65

    Set format

    force_format=png

    forces using the PNG image compression

    /samples.scaleflex.com/Cloudimage-BY-SCALEFLEX.svg?w=400&force_format=png

    Set format

    force_format=webp

    forces using the WebP image compression

    Quality

    q=X X=0..100

    the smaller the value of q, the more your image will be compressed. Be careful - the quality of the image will decrease as well.

    Lossless

    lossless=1

    use lossless webp compression

    /samples.scaleflex.com/paris.jpg?w=400&force_format=webp

    /samples.scaleflex.com/perfcheck.png?w=400&force_format=webp&lossless=1

    Commercetools tutorial

    Commercetools implementation

    The react-cloudimage-responsive library is a React component that allows you to easily add responsive images to your web application using the Cloudimage service. With this package, you can load and display optimized images that are automatically resized based on the device screen size and pixel density.

    It is a simple and easy-to-use package that can help you improve the performance and user experience of your web application by optimizing it.

    Installation

    Prerequisites

    You can create an account on the .

    Install the component

    You can install using npm or yarn:

    or

    Usage

    To use , you need to provide it with a Cloudimage URL and some additional parameters. Here's an example:

    In this example, we're passing three props to the "CloudimageResponsive" component:

    • alt: The alternate text to display for the image. This is required for accessibility reasons.

    • image: The URL of the original image to be optimized and resized by Cloudimage.

    • cloudimageConfig: An object that contains the Cloudimage configuration parameters. This includes your Cloudimage API token, the base URL of your Cloudimage service, and the resizing, quality, and format parameters for the image.

    Configuration options

    Here are the configuration parameters you can use in the "cloudimageConfig" object:

    token

    Type: String | Default: "demo" | required

    Your Cloudimage customer token. for a Cloudimage account to get one. The subscription takes less than a minute and is totally free.

    customDomain

    Type: String | Default: "cloudimage.io" | optional

    If you use a custom CNAME for your cloudimage integration, you can set it here.

    baseURL

    Type: String | Default: "/" | optional

    Your image folder on server, this alows to shorten your origin image URLs.

    apiVersion

    Type: String |Default: 'v7' | optional

    Allow to use a specific version of API.

    • set a specific version of API

    • disable API version

    Note: this will disregard your token above as this should be built into the CNAME entry.

    doNotReplaceURL

    Type: bool | Default: false

    If set to true the plugin will only add query params to the given source of image.

    lazyLoading

    Type: Bool | Default: true | optional

    Only images close to the client's viewport will be loaded, hence accelerating the page loading time. The plugin uses library to achieve it.

    lazyLoadOffset

    Type: Number/Array(Number) | Default: 100

    Say if you want to preload a component even if it's 100px below the viewport (user have to scroll 100px more to see this component), you can set offset props to 100. On the other hand, if you want to delay loading a component even if it's top edge has already appeared at viewport, set offset to negative number.

    Library supports horizontal lazy load out of the box. So when you provide this prop with number like 100 it will automatically set left edge offset to 100 and top edge to 100;

    If you provide this prop with array like [100, 200], it will set left edge offset to 100 and top offset to 200.

    params

    Type: String | Default: 'org_if_sml=1' | optional

    Applies default Cloudimage operations/ filters to your image, e.g. brightness, contrast, rotation... Multiple params can be applied, separated by "&" e.g. wat_scale=35&wat_gravity=northeast&wat_pad=10&grey=1

    alternative syntax: type: Object

    placeholderBackground

    Type: String | Default: '#f4f4f4' | optional

    Placeholder coloured background while the image is loading or use it to set your custom placeholder image or gif

    For example:

    lowQualityPreview

    Type: Object

    lowQualityPreview.minImgWidth number (default: 400) - minimum width of an image to load a low-quality preview image

    presets

    Type: Object

    Default:

    Breakpoints shortcuts to use in image size property, can be overridden.

    limitFactor

    Type: Number | Default: 100 | optional

    Rounds up the size of an image to the nearest limitFactor value.

    For example:

    • For an image with width 358px and limitFactor equal to 100, the plugin will round up to 400px.

    • For an image with width 358px and limitFactor equal to 5, the plugin will round up to 360px.

    devicePixelRatioList

    Type: [Number,...] | Default: [1, 1.5, 2] | optional

    List of supported device pixel ratios. If there is no need to support retina devices, you should set an empty array devicePixelRatioList: [].

    delay

    Type: Number | optional

    Delay for processing an image after rendering component.

    NOTE: Normally, the parameter is not needed but in some cases with integrating third-party libraries, it can fix wrong calculation of image container.

    ImageSizeAttributes

    Type: String | possible values: 'use', 'ignore', 'take-ratio' | Default: 'use'

    If width and height attributes are set:

    use - width & height attributes values will be used to calculate image size (according to user's DPR) and ratio.

    take-ratio - width & height attributes values will be used only to calculate ratio.

    ignore - width & height attributes will be ignored.

    If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR)

    Note: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute

    Properties

    Here are the properties you can use with the "CloudimageResponsive" component:

    • alt: The alternate text to display for the image. This is required for accessibility reasons.

    • image: The URL of the original image to be optimized and resized by Cloudimage.

    • cloudimageConfig: An object that contains the Cloudimage configuration parameters.

    • className: An optional class name to apply to the image container.

    Wordpress

    All-in-One Digital Asset Management and Cloudimage Media Optimization Plugin for WordPress

    Overview

    Scaleflex VXP is a powerful WordPress plugin designed to help businesses efficiently manage and optimize their digital assets. Integrating two key features - Scaleflex Digital Asset Management (DAM) and Cloudimage Digital Media Optimization (DMO) - Scaleflex VXP enables you to store, organize, deliver, and optimize images, videos, and other digital resources directly within WordPress.

    • DAM (Digital Asset Management): Seamlessly organize, search, and control all your digital assets, ensuring brand consistency and boosting team collaboration.

    • Cloudimage (Digital Media Optimization): Automatically optimize images and videos for size and loading speed, enhancing user experience and improving website performance.

    With the Scaleflex VXP plugin for WordPress, you don’t just store, you take full control of your assets. Experience a streamlined, modern, and scalable digital content management workflow today!

    Install the plugin from your WordPress admin or from the .

    Prerequisites

    Create an account if you have not registered already. You can create an account on the .

    Installation

    • Log in to your WordPress admin panel.

    • On the Admin sidebar, navigate to Plugins > Add New.

    • Enter "Scaleflex VXP" in the search field and then install the plugin.

    • Once installed, click Activate.

    • Fill in the plugin settings page with the required authentication details

    Configure the plugin

    You need to enter your Cloudimage account token, which you have received upon account creation.

    With Cloudimage, we will have two modes when using:

    • JavaScript Mode: Replace image URLs with JavaScript

    • Standard Mode: Replace image URLs not using any JavaScript

    Configuration options

    • Remove V7

      • Some tokens are associated with a v7 URL, while others are not.

      • But not to worry, this plugin automatically checks and sets it for you, all within a few seconds.

      • Eg: If you enter a v7 token into the text input field, then a few seconds later, the v7 dial will automatically turn itself on.

    • Prevent Image Upsize: If you set Maximum "Pixel ratio" equal to 2, but some of your assets do not have min retina size (at least 2560x960), please enable this to prevent image resized. By default, yes.

    • Image Quality: The smaller the value, the more your image will be compressed. Careful - the quality of the image will decrease as well. By default, 90.

    • Ignore SVG Image: Ignore converting the SVG file to a CDN URL.

    Use Mode

    Without Cloudimage

    Your image URL will be like this:

    With Cloudimage

    Notice that the URLs have been appended https://token.cloudimg.io/ to ensure CDN delivery and optimization of images.

    With Cloudimage and Use Mode as "JavaScript Mode"

    Cloudimage will:

    • The ci-src() attribute will be added to theimgelement, which will

      • generate data-srcset

      • set resize

    With Cloudimage and Use Mode is "Standard Mode"

    Cloudimage will change the attribute "src" in the img tag without JavaScript

    When to use JavaScript Mode and when it’s better not to use

    Localhost

    Please note that Scaleflex VXP - Cloudimage will not take effect on localhost

    Advanced Configuration

    Standard Mode

    • URL Signature: To prevent URL tampering and protect your token, every Cloudimage URL can be secured with an SHA-1 HMAC signature. Read more .

    • Enable srcset adding: Adding srcset for the img tag. By default, this mode will remove the srcset

    • Srcset widths (px): The widths in pixels that would be generated for the srcset tag if the srcset adding option is enabled. Separated by a comma (,)

    JavaScript mode

    • Local JavaScript libraries:

      • ON: Use Cloudimage JS files from CDN

      • OFF: Use Cloudimage JS files from the plugin locally

    • Use Origin URL: If enabled, the plugin will only add query parameters to the image source URL, avoiding double CDN in some cases, like if you have aliases configured.

    Shopify integration

    Shopify integration

    Cloudimage will accelerate your Shopify shop by compressing images and delivering them over CDN.

    Step 1. Configure an origin HTTP-Storage in Cloudimage

    After finding out your Shopify URL as shown below (i.e. https://cdn.shopify.com, https://cdn2.shopify.com or https://cdn.shopifycloud.com), you can create a HTTP-Storage in Cloudimage.

    composer require scaleflex/sylius-cloudimage-plugin
    <?php
    # config/bundles.php
    return [
        // ...
        Scaleflex\SyliusCloudimagePlugin\ScaleflexSyliusCloudimagePlugin::class => ['all' => true],
    ];
    nonebin/console doctrine:migration:diff
    bin/console doctrine:migration:migrate
    {{ include('@ScaleflexSyliusCloudimagePlugin/Admin/Channel/extendedChannelForm.html.twig') }} 
    # config/packages/sylius_ui.yaml
    sylius_ui:
      events:
        sylius.shop.layout.head:
          blocks:
            cloudimage_script: '@ScaleflexSyliusCloudimagePlugin\Shop\cloudimageScript.html.twig'
        sylius.shop.layout.after_body:
          blocks:
            cloudimage_process: '@ScaleflexSyliusCloudimagePlugin\Shop\cloudimageProcess.html.twig'
    #templates/bundles/SyliusShopBundle/Product/_mainImage.html.twig
    {% if product.imagesByType('thumbnail') is not empty %}
      {% set path = product.imagesByType('thumbnail').first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
      {% elseif product.images.first %}
      {% set path = product.images.first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
      {% else %}
      {% set path = '//placehold.it/200x200' %}
      {% endif %}
      <img {{ ci_src(path) }} {{ sylius_test_html_attribute('main-image') }} alt="{{ product.name }}" class="ui bordered image" />
    {% if sylius.channel.cloudimageStatus and sylius.channel.cloudimageToken %}
          <script>
              window.ciResponsive.process();
          </script>
      {% endif %}
    /samples.scaleflex.com/classroom.jpg?func=fit&width=600&height=600&q=70&bg_img_fit=1&bg_blur=15&bg_gravity=west&bg_colorize=lc000000&bg_opacity=0.5
    /samples.scaleflex.com/castle_doc.jpg?w=600&h=245&func=fit&bg_color=113650
    /samples.scaleflex.com/castle_doc.jpg?w=600&h=245&func=fit&bg_color=113650&fit_enlarge=1

    Lazy Loading

    If enabled, images will be lazy-loaded for better initial loading times and user experience. ⚠️ lazy loading can have variable results on some websites as for the first rows of images loaded, therefore it is recommended to make use of an integrated new class provided: “lazy-off”. You can specify the "lazy-off" class either in the page builder through the back-office, or in the templates directly (eg. category page and product page).

    Custom js function

    🚨 Any js function to customize the behavior of the Cloudimage library. Attention, adding js should only be done by advanced administrators as it can break the js or have unintended effects if not thoroughly tested and validated.

    Image Quality

    Customizes image quality, therefore compression -influences the size of image-.applied by default. Warning, a setting under 80 might have a potentially visible impact.

    Ignore SVG images

    If enabled, all SVG images will be skipped from acceleration as anyway vector images will not be compressed.

    Maximum "Pixel ratio"

    List of supported device pixel ratios, default is 2, eg: 2 for Retina devices

    Custom Library Options

    🚨 Those optional parameters will be added to the request for each URL going through the Cloudimage acceleration infrastructure. It can allow you to force image formats, apply automatic transformations or watermarking, and might be used for troubleshooting purposes. For advanced users only, please refer to the Cloudimage documentation here for the list of possible parameters.

  • style: An optional object that contains CSS styles to apply to the image container.

  • Cloudimage registration page
    react-cloudimage-responsive
    react-cloudimage-responsive
    Subscribe
    react-lazyload

    Navigate to the settings page.

  • Select "Cloudimage - Digital Media Optimization (DMO)".

  • Please be patient and wait for the “The v7 checking process …” message to disappear before pressing the “SAVE ALL CHANGES“ button.

    Skip classes:
    HTML tags with the specified classes would be skipped. Separated by a comma (,)
  • Skip files: Files with these extensions would be skipped. Separated by a comma (,)

  • lazy loading https://github.com/scaleflex/js-cloudimage-responsive#lazyloading

    Lazy Loading: If enabled, only images close to the current viewpoint will be loaded.

  • Maximum "Pixel Ratio": List of supported device pixel ratios, eg 2 for Retina devices.

  • Image Size Attributes: Used to calculate the width and height of images.

  • Custom JavaScript function: A valid JavaScript function starting with { and finishing with }.

  • Custom library options: Automatically adds Cloudimage parameters for all images, e.g. watermark=1 to put a watermark on all images. The list of all available parameters can be found on docs.cloudimage.io

  • WP Marketplace
    Cloudimage registration page
    https://github.com/scaleflex/js-cloudimage-responsive#step-3-implement-in-an-img-tag-or-use-it-as-a-background-image
    here
    npm install react-cloudimage-responsive
    yarn add react-cloudimage-responsive
    import React from 'react';
    import CloudimageResponsive from 'react-cloudimage-responsive';
    
    const MyComponent = () => {
      const cloudimageConfig = {
        token: 'your-token',
        baseURL: 'https://your-subdomain.cloudimg.io/v7/',
        params: {
          resize: {
            width: 500,
            height: 500,
            type: 'fit',
          },
          quality: 90,
          format: 'webp',
        },
      };
    
      return (
        <CloudimageResponsive
          alt="My Image"
          image="https://example.com/my-image.jpg"
          cloudimageConfig={cloudimageConfig}
        />
      );
    };
    const cloudimageConfig = {
      token: 'demo',
      baseURL: 'https://cdn.scaleflex.it/demo/',
      apiVersion: 'v7' // optional
    };
    const cloudimageConfig = {
      token: 'demo',
      baseURL: 'https://cdn.scaleflex.it/demo/',
      apiVersion: null // optional
    };
    params: 'org_if_sml=1'
    params: {
        org_if_sml: 1,
        grey: 1,
        ...
    }
    placeholderBackground: "url('https:/
    https://cdn.scaleflex.it/filerobot/red-loader.gif
    ') 50% 50% no-repeat"
    lowQualityPreview: {
      minImgWidth = 400
    }
    const cloudimageConfig = {
      token: 'demo',
      baseUrl: 'https://cdn.scaleflex.it/demo/',
      ...
      presets: {
          xs: '(max-width: 575px)', // up to 575    PHONE
          sm: '(min-width: 576px)', // 576 - 767    PHABLET
          md: '(min-width: 768px)', // 768 - 991    TABLET
          lg: '(min-width: 992px)', // 992 - 1199   SMALL_LAPTOP_SCREEN
          xl: '(min-width: 1200px)' // from 1200    USUALSCREEN
      }
    };
    <img 
      class="alignnone size-medium wp-image-437" 
      src="http://wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats-201x300.jpeg" 
      alt="" 
      width="201" 
      height="300" 
      srcset="https://wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats-201x300.jpeg 201w, 
              https://wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats-600x894.jpeg 600w, 
              https://wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg 644w" 
      sizes="(max-width: 201px) 100vw, 201px"
    >
    <img 
      class="alignnone size-medium wp-image-440" 
      src="https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?func=bound&amp;w=300&amp;h=300" 
      alt="" 
      width="300" 
      height="300" 
      srcset="https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=150 150w, 
              https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=450 450w, 
              https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=100 100w
      sizes="(max-width: 300px) 100vw, 300px"
    >
    <img 
      class="alignnone size-medium wp-image-440 ci-image ci-image-loaded lazyloaded" 
      ci-src="https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?func=bound&amp;w=300&amp;h=300" 
      alt="" 
      data-srcset="https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=300&amp;org_if_sml=1&amp;func=bound 1x, 
                   https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=450&amp;org_if_sml=1&amp;func=bound 1.5x, 
                   https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=600&amp;org_if_sml=1&amp;func=bound 2x" 
      data-src="https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=300&amp;org_if_sml=1&amp;func=bound" 
      srcset="https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=300&amp;org_if_sml=1&amp;func=bound 1x, 
              https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=450&amp;org_if_sml=1&amp;func=bound 1.5x, 
              https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=600&amp;org_if_sml=1&amp;func=bound 2x" 
      src="https://token.cloudimg.io/https://token.cloudimg.io/wp.sandbox.sfxconnector.com/wp-content/uploads/catswillbecats.jpeg?w=300&amp;org_if_sml=1&amp;func=bound"
    >

    Create the Storage record in the Cloudimage admin as follows:

    Step 2. Verify alias

    Adding an HTTP-based Storage will make you create a Cloudimage Alias. After saving the storage in Step 1 above, verify that images are delivered correctly over your Cloudimage URL with the Alias:

    Origin image URL on Shopify:

    https://cdn.shopify.com/shopifycloud/brochure/assets/home/hero-stock-small-72c1242fc5bbf6cfe135968110e9c52435af1e389c0fd4fe68208d21427e21e0.jpg

    Cloudimage URL with Alias:

    https://{token}.cloudimg.io/_myshopify_/shopifycloud/brochure/assets/home/hero-stock-small-72c1242fc5bbf6cfe135968110e9c52435af1e389c0fd4fe68208d21427e21e0.jpg

    Replace {token} with your Cloudimage token.

    Unable to delivery images over your Cloudimage URL? Contact [email protected] if you are not able to fetch the image as explained above. In such a situation, do not move to step 3 as this could break your website images.

    Step 3. Create settings_schema.json

    Proceed with making the changes in our Shopify settings and theme files to switch the image delivery to Cloudimage.

    From your Shopify admin, click Online Store > Themes. Find the theme you want to edit, click the Actions button and then Edit code.

    Under Config, click settings_schema.json and append the code below after the last section of this file:

    Step 4. Create cloudimage.liquid and cloudimage-video-tag.liquid file

    Create new files cloudimage.liquid and cloudimage-video-tag.liquid under the Snippets directory. Copy the code below into that file, and save it:

    • cloudimage.liquid

    • cloudimage-video-tag.liquid

    Step 5. Enable Cloudimage

    Navigate to Online store > Themes > Customize theme. In the sidebar, under Theme Settings open Cloudimage and enable it. Fill out the below two fields:

    • Cloudimage Token - It should be your Cloudimage Token

    • Default URL endpoint - It should be //{token}.cloudimg.io/myshopify (where token is your Cloudimage token)

    • Shopify CDN domain - Its value should be //cdn2.shopify.com, //cdn.shopify.com

    • Hit the "Save" button.

    Step 6. Edit your theme files

    The final step of this tutorial is to adapt your theme files to start delivering your images over Cloudimage.

    Backup your theme files. Before making changes in these files, it is recommended that you download and save them securely to be able to restore them later in case of error.

    For more information, please see the Theme files and FAQ sections.

    Image operations

    Basic image resizing operations

    Resizing operations enable the dynamic generation of image transformations to meet various web delivery use cases. Operations focus on the image size while Image filters allow to modify the image itself.

    Most of the on-the-fly image transformations can be configured using the Asset Variation Builder, an in-line URL builder to preview each image transformation instantly.

    Available operations

    Operation
    Syntax
    Description

    Do not hesitate to if you need any additional operations not listed above

    Resize functions

    When you resize an image by specify both width and height, the original image proportions can be either ignored or maintained. You may also choose to add padding to the image to fill the blank space (extending the canvas).

    Cloudimage supports the following resize functions (defined with the func parameter):

    Crop

    Keeps image proportions, cutting the image to fit the defined width and height; see

    This resizing function removes parts of the image and is the default behavior when both width and height are defined. Read further for other resizing functions.

    Preview
    Syntax

    Fit

    Resizes the image, keeping proportions and extending the canvas (by adding padding) to satisfy the desired dimensions; see

    Preview
    Syntax

    Cropfit

    Performs either or based on the image dimensions, aspect ratio and transformation parameters; see

    This resizing function may remove (crop out) parts of the image.

    Preview
    Syntax

    Bound

    Fits image in a box of defined size without adding padding; see

    Preview
    Syntax

    The boundmin operation is a special case of bound where the smaller dimension is respected instead of the larger one; see

    Cover

    Resizes the image to the given width and height, ignoring original image proportions, thus distorting the image; see

    Preview
    Syntax

    For troubleshooting purposes, use the ci_info=1 operation to view details about resizing and compression, for example,

    {
      "name": "Cloudimage",
      "settings": [
        {
          "type": "paragraph",
          "content": "Check out Cloudimage's [Cloudimage and Shopify integration](https://docs.cloudimage.io/go/cloudimage-documentation-v7/en/dev-implementation/shopify-tutorial) to learn more about this."
        },
        {
          "type": "checkbox",
          "id": "enableCloudimage",
          "label": "Enable Cloudimage"
        },
        {
          "type": "text",
          "id": "cloudImageToken",
          "label": "Cloudimage Token",
          "info": "The token of Cloudimage"
        },
        {
          "type": "text",
          "id": "cloudImageUrl",
          "label": "Cloudimage url endpoint",
          "info": "The url endpoint you set within Cloudimage. Example: //token.cloudimg.io/v7/_myshopify_"
        },
        {
          "type": "text",
          "id": "cloudimageShopifyCdnUrl",
          "label": "Shopify CDN domain",
          "default": "//cdn.shopify.com",
          "info": "Do not change this unless you have a proxy in place. Not sure? Leave it as is."
        }
      ]
    }
    {% capture CLOUDIMAGE %}
     {% if settings.enableCloudimage%}
       {% for i in (1..1) %}
         {% unless src or settings.cloudImageUrl != blank %}
           {{ src }}
           {% break %}
         {% endunless %}
         {% assign cdnUrls = settings.cloudimageShopifyCdnUrl | split: ',' %}
       {% if cdnUrls.size  == 0 %}
       {{ src }}
           {% break %}
       {% endif %}
         {% assign cdnUrl = cdnUrls[0] %}
         {% for temp in cdnUrls %}
           {% if src contains temp %}
             {% assign cdnUrl = temp %}
             {% break %}
           {% endif %}
         {% endfor %}
       {% assign cdnUrl = cdnUrl | strip %}
       {% unless src contains cdnUrl %}
           {{ src }}
           {% break %}
         {% endunless %}
       {% assign cloudImageUrl = settings.cloudImageUrl | strip %}
         {% assign tempCloudImageUrl = cloudImageUrl %}
         {% assign lastChar = cloudImageUrl | slice:-1 %}
         {% assign cloudImageUrlLength = cloudImageUrl | size %}
         {% assign newCloudImageUrl = cloudImageUrlLength | minus:1 %}
         {% if lastChar == "/" %}
           {% assign tempCloudImageUrl = cloudImageUrl | slice:0,newCloudImageUrl %}
         {% endif %}
       {% assign newSrc = src | strip | replace:cdnUrl,tempCloudImageUrl %}
       {{ newSrc | default:src }}
       {% endfor %}
     {% else %}
       {{ src }}
     {% endif %}
    {% endcapture %}{{ CLOUDIMAGE | strip | replace:'  ' | strip_newlines }}
    {% comment %}
        Renders video tag
    
        Accepts:
        - image_size: {String} Size of media
        - autoplay: {Boolean} Video autoplay
        - loop: {String} Video loop
        - controls: {Boolean} Video controls
        - url: {String} Video url
        - muted: {Boolean} Video muted
    
        Usage:
        {% render 'cloudimage-video-tag',
          image_size: image_size,
          autoplay: autoplay,
          loop: loop,
          controls: controls,
          url: url,
          muted: muted
        %}
    {% endcomment %}
    
    {% if settings.enableCloudimage%}
     {% for i in (1..1) %}
       {% unless url or settings.cloudImageUrl != blank %}
         {% assign newSrc = url %}
         {% break %}
       {% endunless %}
       {% assign cdnUrls = settings.cloudimageShopifyCdnUrl | split: ',' %}
       {% if cdnUrls.size  == 0 %}
         {% assign newSrc = url %}
         {% break %}
       {% endif %}
       {% assign cdnUrl = cdnUrls[0] %}
       {% for temp in cdnUrls %}
         {% if url contains temp %}
           {% assign cdnUrl = temp %}
           {% break %}
         {% endif %}
       {% endfor %}
     {% assign cdnUrl = cdnUrl | strip %}
     {% unless url contains cdnUrl %}
         {% assign newSrc = url %}
         {% break %}
       {% endunless %}
       {% assign cloudImageUrl = settings.cloudImageUrl | strip %}
       {% assign tempCloudImageUrl = cloudImageUrl %}
       {% assign lastChar = cloudImageUrl | slice:-1 %}
       {% assign cloudImageUrlLength = cloudImageUrl | size %}
       {% assign newCloudImageUrl = cloudImageUrlLength | minus:1 %}
       {% if lastChar == "/" %}
         {% assign tempCloudImageUrl = cloudImageUrl | slice:0,newCloudImageUrl %}
       {% endif %}
     {% assign newSrc = url | strip | replace:cdnUrl,tempCloudImageUrl | append: '&func=proxy' %}
     {% endfor %}
    {% else %}
      {% assign newSrc = url %}
    {% endif %}
    
    {%- if controls -%}
      {% assign videoControls = 'controls="controls"' %}
    {%- else -%}
      {% assign videoControls = "" %}
    {%- endif -%}
    
    {%- if autoplay -%}
      {% assign videoAutoplay = 'autoplay="autoplay"' %}
    {%- else -%}
      {% assign videoAutoplay = "" %}
    {%- endif -%}
    
    {%- if muted -%}
      {% assign videoMuted = 'muted="muted"' %}
    {%- else -%}
      {% assign videoMuted = "" %}
    {%- endif -%}
    
    <video playsinline="playsinline" {{ videoControls }} {{ videoAutoplay }} {{ videoMuted }}>
      <source src="{{ newSrc }}" type="video/mp4">
    </video>

    tl_px=X,Y

    defines the coordinates of the top left corner of the cropping rectangle when performing positionable crop

    br_px=X,Y

    sets coordinates of the bottom right corner of the cropping rectangle when performing positionable crop

    func=face

    crops the image automatically focusing on the most prominent face in the image (if a face is detected)

    func=fit

    resizes the image to the desired dimensions without distorting it by increasing the image canvas if necessary, to achieve the desired aspect ratio

    margin=X

    sets the minimum margin when using the fit resize mode

    func=cropfit

    resizes the image while automatically choosing between the crop and fit resize modes depending on the origin image dimensions, the desired dimensions, and the other parameters in the transformation URL

    func=bound

    resizes the image to dimensions no larger than the ones specified in the transformation URL. The resulting image might not match both width and height depending on the desired aspect ratio

    func=boundmin

    resizes the image to dimensions no larger than the larger one specified in the transformation URL. The resulting image might not match both width and height depending on the desired aspect ratio

    func=cover

    resizes the image to the set width and hight while ignoring the origin aspect ratio (image might be distorted)

    flip=[h][v]

    mirrors the image horizontally and/or vertically

    r=X

    rotates the image to an arbitrary angle of X degrees (counterclockwise)

    trim=X

    trims any solid-color border (if present); X is the aggressiveness of the operation

    radius=X

    rounds the corners of the image while optionally fills the empty background with a chosen color

    bg_remove=1

    removes the background of the image using AI

    Width and height

    width=X

    resizes the image width to X pixels while keeping original aspect ratio

    Width and height

    height=X

    resizes the image height to X pixels while keeping original aspect ratio

    Prevent enlargement

    org_if_sml=1

    prevents upscaling if any of the target dimensions is larger than the origin image

    Crop

    func=crop

    resizes the image to the desired dimensions without distorting it while cropping out portions of the image if necessary, to achieve the desired aspect ratio. You need to also provide both width and height

    gravity=X

    /samples.scaleflex.com/hotel.jpg?w=400&h=200&func=crop

    /samples.scaleflex.com/hotel.jpg?w=400&h=200&func=fit&bg_color=000

    650x500 origin image, resolves to "crop": /samples.scaleflex.com/classroom.jpg?func=cropfit&w=500&h=350&bg_colour=auto

    Same parameters, 400x250 origin image, resolves to "fit": /samples.scaleflex.com/ny_doc.jpg?func=cropfit&w=500&h=350&bg_colour=auto

    /samples.scaleflex.com/hotel.jpg?w=400&h=200&func=bound

    /samples.scaleflex.com/hotel.jpg?w=400&h=250&func=cover

    contact us
    Crop
    Fit
    Cropfit
    Bound
    Boundmin
    Cover
    /sample.li/hotel.jpg?w=400&ci_info=1
    Crop
    Fit

    defines the desired "focal point" of the image. Used with func=crop, this will set the part of the image which will be retained. With the func=fit resize mode, it will set the placement of the image within the new canvas X = [north | south][east | west] | auto | smart | trim | X,Y

    Text watermark fonts

    Fonts available to use for text watermarks

    Andale-Mono

    LMMonoProp10-Oblique

    LMSans9-Regular

    Arial

    LMMonoProp10-Regular

    LMSansDemiCond10-Oblique

    Arial-Black

    LMMonoPropLt10-Bold

    LMSansDemiCond10-Regular

    Arial-Bold

    LMMonoPropLt10-BoldOblique

    LMSansQuot8-Bold

    Arial-Bold-Italic

    LMMonoPropLt10-Oblique

    LMSansQuot8-BoldOblique

    Arial-Italic

    LMMonoPropLt10-Regular

    LMSansQuot8-Oblique

    Century-Schoolbook-L-Bold

    LMMonoSlant10-Regular

    LMSansQuot8-Regular

    Century-Schoolbook-L-Bold-Italic

    LMRoman10-Bold

    Liberation-Mono

    Century-Schoolbook-L-Italic

    LMRoman10-BoldItalic

    Liberation-Mono-Bold

    Century-Schoolbook-L-Roman

    LMRoman10-Italic

    Liberation-Mono-Bold-Italic

    Comic-Sans-MS

    LMRoman10-Regular

    Liberation-Mono-Italic

    Comic-Sans-MS-Bold

    LMRoman12-Bold

    Liberation-Sans

    Courier-New

    LMRoman12-Italic

    Liberation-Sans-Bold

    Courier-New-Bold

    LMRoman12-Regular

    Liberation-Sans-Bold-Italic

    Courier-New-Bold-Italic

    LMRoman17-Regular

    Liberation-Sans-Italic

    Courier-New-Italic

    LMRoman5-Bold

    Liberation-Sans-Narrow

    DejaVu-Sans

    LMRoman5-Regular

    Liberation-Sans-Narrow-Bold

    DejaVu-Sans-Bold

    LMRoman6-Bold

    Liberation-Sans-Narrow-Bold-Italic

    DejaVu-Sans-Mono

    LMRoman6-Regular

    Liberation-Sans-Narrow-Italic

    DejaVu-Sans-Mono-Bold

    LMRoman7-Bold

    Liberation-Serif

    DejaVu-Serif

    LMRoman7-Italic

    Liberation-Serif-Bold

    DejaVu-Serif-Bold

    LMRoman7-Regular

    Liberation-Serif-Bold-Italic

    FreeMono

    LMRoman8-Bold

    Liberation-Serif-Italic

    FreeMono-Bold

    LMRoman8-Italic

    Nimbus-Mono-L

    FreeMono-Bold-Oblique

    LMRoman8-Regular

    Nimbus-Mono-L-Bold

    FreeMono-Oblique

    LMRoman9-Bold

    Nimbus-Mono-L-Bold-Oblique

    FreeSans

    LMRoman9-Italic

    Nimbus-Mono-L-Regular-Oblique

    FreeSans-Bold

    LMRoman9-Regular

    Nimbus-Roman-No9-L

    FreeSans-Bold-Oblique

    LMRomanCaps10-Oblique

    Nimbus-Roman-No9-L-Medium

    FreeSans-Oblique

    LMRomanCaps10-Regular

    Nimbus-Roman-No9-L-Medium-Italic

    FreeSerif

    LMRomanDemi10-Oblique

    Nimbus-Roman-No9-L-Regular-Italic

    FreeSerif-Bold

    LMRomanDemi10-Regular

    Nimbus-Sans-L

    FreeSerif-Bold-Italic

    LMRomanDunh10-Oblique

    Nimbus-Sans-L-Bold

    FreeSerif-Italic

    LMRomanDunh10-Regular

    Nimbus-Sans-L-Bold-Condensed

    Georgia

    LMRomanSlant10-Bold

    Nimbus-Sans-L-Bold-Condensed-Italic

    Georgia-Bold

    LMRomanSlant10-Regular

    Nimbus-Sans-L-Bold-Italic

    Georgia-Bold-Italic

    LMRomanSlant12-Regular

    Nimbus-Sans-L-Regular-Condensed

    Georgia-Italic

    LMRomanSlant17-Regular

    Nimbus-Sans-L-Regular-Condensed-Italic

    Impact

    LMRomanSlant8-Regular

    Nimbus-Sans-L-Regular-Italic

    LMMono10-Italic

    LMRomanSlant9-Regular

    Noto-Mono

    LMMono10-Regular

    LMRomanUnsl10-Regular

    Times-New-Roman

    LMMono12-Regular

    LMSans10-Bold

    Times-New-Roman-Bold

    LMMono8-Regular

    LMSans10-BoldOblique

    Times-New-Roman-Bold-Italic

    LMMono9-Regular

    LMSans10-Oblique

    Times-New-Roman-Italic

    LMMonoCaps10-Oblique

    LMSans10-Regular

    Trebuchet-MS

    LMMonoCaps10-Regular

    LMSans12-Oblique

    Trebuchet-MS-Bold

    LMMonoLt10-Bold

    LMSans12-Regular

    Trebuchet-MS-Bold-Italic

    LMMonoLt10-BoldOblique

    LMSans17-Oblique

    Trebuchet-MS-Italic

    LMMonoLt10-Oblique

    LMSans17-Regular

    URW-Bookman-L-Demi-Bold

    LMMonoLt10-Regular

    LMSans8-Oblique

    URW-Bookman-L-Demi-Bold-Italic

    LMMonoLtCond10-Oblique

    LMSans8-Regular

    URW-Bookman-L-Light

    LMMonoLtCond10-Regular

    LMSans9-Oblique

    URW-Bookman-L-Light-Italic

    Positionable crop
    Face crop
    Fit
    Cropfit
    Bound
    Boundmin
    Cover
    Flip
    Rotate
    Trim
    Rounded corners
    Background removal