Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Summary

Excerpt

Construct the download file name for images and use a title and additional EXIF values.

Code Block
languagejson
{{data.corporateLayer.title.x-default
	| replace: " ", "-" 
	| append: "_" 
	| append:data.imageMetadata.width
	| append:"x" 
	| append:data.imageMetadata.height 
	| append: "_" 
	| append:data.imageMetadata.colorSpace 
	| append: "_" 
	| append:data.imageMetadata.colorProfile 
}}

Use Case

We want to include the title and EXIF value in the filename of a Content Item that is downloaded. This way we can ensure that our file naming convention is correctly applied. 

The file naming convention is: Title_WidthxHeight_ColorSpace_ColorProfile

...

  • We have all this information available from EXIF

The desired outcome is: Fruit-on-table_1024x765_RGB_AdobeRGB.jpg

...

Code Block
languagejson
{{data.corporateLayer.title.x-default
	| replace: " ", "-" 
	| append: "_" 
	| append:data.imageMetadata.width
	| append:"x" 
	| append:data.imageMetadata.height 
	| append: "_" 
	| append:data.imageMetadata.colorSpace 
	| append: "_" 
	| append:data.imageMetadata.colorProfile 
}}

Limitation

  • EXIF information is not available for all file types. Check yourself in Picturepark File Type - Settings - Fields what Picturepark supports.