Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Do you need dynamic or on-demand resize?

We have a solution for you which must be used together with a CDN. 

So what is described here must act as an origin to a CDN for it to not be to costly. The CDN must be caching all unique URLs.

How it works

Please contact Digizuite for getting the resize URL. When you have this URL then you can manipulate your images in the following way:

  • These parameters can be added to the above:

    • Mandatory

      • function=resize

      • mimeType: The format to store image in such as image/jpeg or image/png

      • destinationid must aslo be present always

    • Optional for resize:

      • Height: New height of image as number (or when used with x, y or gravity then it becomes the height around the focal point)

      • Width: New width of image as number (or when used with x, y or gravity then it becomes the width around the focal point)

      • aspectType: Scale image acording formula: aspectType=0 Dont hold ascpec, aspectType=1 Hold height scrink width, aspectType=2 hold width scrink height, aspectType=3 in box

      • quality: Quality of the image in a value between 0 and 100 (The quality setting applies only to the JPEG encoder. PNG and BMP are both lossless, meaning that there's no quality/space trade-off to be made)

      • force: if this is true then it will always recalculate so only use this when needing to update the underlying asset to ensure newest version (do not use on all requests)

      • lastUpdated: Timestamp (just in miliseconds) of when the asset was last updated in the DAM (this is important for CDN since each URL is unique). This is often received from the DAM or if push-based integration then it is the last update you received.

    • Focal Point (optional)**

      • x: Offset for the x coordinate (in pixels)

      • y: Offset for y coordinate (in pixels)

      • gravity: Specific placement of gravity (overrules x and y). Read more: https://www.google.com/search?q=ImageMagick.Gravity

        • Northwest, North, Northeast, West, Center, East, Southwest, South, Southeast

      • cH: Crop height in pixels (must be used with either x,y or gravity)

      • cW: Crop width in pixels (must be used with either x,y or gravity)

  •  Example (NOT THE DAM URL):

    • [DAM_RESIZE_URL]/Dmm3BWSV3/AssetStream.aspx?assetID=[AssetId]&mediaformatid=[MediaFormatId]&destinationid=[DestinationId]&accesskey=[AccessKey]&function=resize&width=[Width]&height=[Height]&quality=[Quality]&mimetype=[MimeType]&aspecttype=[AspectType]&force=false&lastUpdated=[LastUpdated]

Configuring it in Azure

1- Create Azure Function in a customer Azure Portal. Give it a name, select the below and ensure that region is corresponding to the one of the customer.

2- Send the Publishing Profile to R&D

3- When R&D have deployed to your azure function, then you must create a CDN (Microsoft CDN). You already have the Azure Function web app which must be the origin.

  • Important is to receive your Client ID from R&D and add this as Origin Path /api/integrations/resize/{client_id}

Create the Origin like this an ensure Origin Type as ‘Web App’.

Configure Origin path like this:

4- Ensure that Caching is correct. It must Cache every unique URL and then

And then also ensure that it caches for at least 60 days if nothing else has been stated:

5- Now start to use (following the details in How it works). Simply take the ‘Endpoint hostname’ and start to use it.

  • No labels