Default or error (404) placeholder image width & height size values

The typical use case:  

The default image is a placeholder returned by Cloudimage in case you have enabled origin domain whitelisting, or the origin image is unavailable.

When this default image is shown, the dimension of the default image is automatically resized with w/h = X/Y.  With X and Y both =400px unless stated otherwise manually.

Even if you explicitly set height AND/OR width values, the resizing engine will keep the proportions of the default image, and the placeholder will fit inside the "box" defined.

No other transformation will be processed whatsoever.

How to do it so it works properly:  

First, let's examine in more detail how the servers process the image, depending on whether it is found.

General process:

  1. When the Cloudimage server finds an image, the below process happens in order:  
    • download of the image
    • inherit of the original image size and proportion
    • Use those to fill in the missing size values
    • apply any transformation as instructed

      2. When the image is missing from the origin server, the below process happens:

  • by default, w/h inherits a value of 400/400
  • the server returns to the CDN server the error response + the default image resized with the available values while skipping all the other processes mentioned in point 1.

Just to remind you, the default image is w/h = 400/400 values unless stated in the URL. 

This is a server-based resolution,; even if you upload a larger image, the result will still be 400/400 for the original default image. 

The default image size will be changed ONLY IF you manually set Cloudimage width and height.

In a scenario, the page is configured to deliver images with w=48&h=100% (h = the so-called variable height). 

So, as expected, the placeholder returns w=48 and h= the original image height (400px), with the default image fitted in this frame, respecting its square proportions of 400x400.

Something like this would be the result:


It is an expected behaviour, and you should then place actual pixel values if you wish to have them in a specific way.

This is related to the fact that delivering default images (with no function added) does not change the default size values for the image and is a server-side default process engineered to take the least resources possible to serve the best existing images.

If you have any questions or issues, please feel free to contact our Software Engineer and mention the following details:

  • Token
  • Short description of the issue (including URLs, screenshots, and a short video if available)
  • Steps to reproduce the issue.
Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.