CS0103: The name 'ImageCropMode' does not exist in the current context
What do I need to do?
The problem I am trying solve is: After going from calling image url directly (/media/xxxx/image.jpg?width=100&height=100) to now using GetCropUrl() a lot of images have some black padding arround them. This only goes away if I go to every single image in the backend, moves the focalpoint and saves.
The name 'ImageCropMode' does not exist in the current context
I want to play with ImageCropMode in method GetCropUrl() so I added:
And changed:
(works)
to ("Max" is just an example mode):
(gives error)
I get this error:
What do I need to do?
The problem I am trying solve is: After going from calling image url directly (/media/xxxx/image.jpg?width=100&height=100) to now using GetCropUrl() a lot of images have some black padding arround them. This only goes away if I go to every single image in the backend, moves the focalpoint and saves.
See example photo below:
Hey Martin,
It seems like you're missing a reference, put this at the top of the cshtml:
Then you should be able to get the crop URL like this:
My bad!!!! 🙄
I wrote that I had added
... but checking my code again I see that I actually forgot...
Thanks! :)
is working on a reply...