Will GetUrlToImage create a new file before url is hit?

Hi am exposing some media files as a javascript object. I want to have a few different size options so I run GetUrlToImage(size,size) multiple times when creating the js object, but will probably only use one size to start with until the possible frontend design change.

Will GetUrlToImage actually create the file on disk when the url is generated or can I prepare the url’s without creating lots of unnecessary files on disk, if the url’s is not in use?

If it creates the files, is my only option to create an endpoint with allowed sizes that do the resize dynamically?

Litium version: 7.3

The URL is generated without generating the physical file. The physical file is generated up on first request.

The url that is generated is also containing an hash of the parts of the url that are validated, the reason of this is that you don’t want a bad visitor to make requests to the same image with different sizes to fill up the disc that may let the site to go down.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.