I have added media crops to the Image cropper property in the media doctype. They have stopped working on the front end - they have been working without any issues:
This is the code that shows the media crop but the front end of the site is displaying the full size image. This has been working perfectly but has just stopped without any notice.
I've seen something similar at some point. I think it's happening because ImageSharp never "sees" the request (and thus, doesn't handle the parameters).
In my case it was caused by something in one of the Startup.cs/Program.cs files, but I don't know enough about it to be able to tell you what's wrong.
Do you know if anything has changed in one of those files (or if a newly installed component could have changed something)?
Thanks for getting back to me - we have made a change to the startup.cs file to secure urls for some media items - perhaps this has something to do with it?
// Custom media endpoint
u.EndpointRouteBuilder.MapControllerRoute(
"SecureMediaRoute",
"secure/{id?}/{file?}",
new
{
controller = "SecureMedia",
action = "Index"
}
);
Yes - I'm pretty sure that'll have something to do with it.
I found the link I was looking for; where I learned about the fact that you can happen to (inadvertently) disable ImageSharp when adding stuff to the build/startup process:
Media Crops have stopped working
I have added media crops to the Image cropper property in the media doctype. They have stopped working on the front end - they have been working without any issues:
This is the code that shows the media crop but the front end of the site is displaying the full size image. This has been working perfectly but has just stopped without any notice.
There is an error in the log relating to images :
But there is no error details contained within it. Any ideas how to fix this?
Thanks Darren
Hi Darren,
I've seen something similar at some point. I think it's happening because ImageSharp never "sees" the request (and thus, doesn't handle the parameters).
In my case it was caused by something in one of the Startup.cs/Program.cs files, but I don't know enough about it to be able to tell you what's wrong.
Do you know if anything has changed in one of those files (or if a newly installed component could have changed something)?
/Chriztian
Hi Chriztian,
Thanks for getting back to me - we have made a change to the startup.cs file to secure urls for some media items - perhaps this has something to do with it?
What do you think? Darren
Hi Darren,
Yes - I'm pretty sure that'll have something to do with it.
I found the link I was looking for; where I learned about the fact that you can happen to (inadvertently) disable ImageSharp when adding stuff to the build/startup process:
https://dev.to/cultiv/til-mime-types-and-static-assets-bdj
Hope that helps you fix the issue,
/Chriztian
Thanks Chriztian,
I'll give this a try - the startup.cs thing you pointed out has fixed the issue.
Darren
is working on a reply...