[This is just a dupe of my answer on slack, but pasting here in case someone else finds the question via search.]
GetCropUrl in itself is just a string building mechanism. There are overloads that look for a file path in the umbracoFile property on an IPublishedContent representing the media. If that's null, GetCropUrl would likely throw a NullReferenceException.
The resulting URL would also need to "find something". Here's a couple of useful links describing how Umbraco finds the files:
Does GetCropUrl always throw exception if file is not existing on physical path?
We encounter the following error on 8.0.2. is it handled on earlier version/s?
System.ArgumentNullException: Value cannot be null. Parameter name: mediaItem
Hi Jace,
[This is just a dupe of my answer on slack, but pasting here in case someone else finds the question via search.]
GetCropUrl
in itself is just a string building mechanism. There are overloads that look for a file path in theumbracoFile
property on anIPublishedContent
representing the media. If that's null,GetCropUrl
would likely throw aNullReferenceException
.The resulting URL would also need to "find something". Here's a couple of useful links describing how Umbraco finds the files:
https://our.umbraco.com/Documentation/Extending/FileSystemProviders/
https://our.umbraco.com/Documentation/Extending/FileSystemProviders/Azure-Blob-Storage/
HTH,
Lars-Erik
is working on a reply...