I'm new to Umbraco and I've started to develop my first website with it.
It seems to work nice with the building blocks you can custom create to put together a page. But I keep having this issue with images.
When I use the getCropUrl method with the right parameters I get an image returned with the correct url. It has the width, height & quality in it. But for some reason the quality is poor, even at quality 100. When I change it to for example quality 20 it seems to work, it gets worse. So What I think is that either the image is already getting downscaled on upload or the quality 100 is also getting downscaled but with "minimal" loss. But the "minimal" loss is too big in my opinion, I'm not happy with this result, I want sharp images.
PS: I'm using Azure Blob Storage.
Does anyone have a solution? I've seen a lot of people complain about this.
Is the image you are using smaller than your crop size? If so you might be seeing upscaling, try adding furtheroptions: "&upscale=0" to your GetCropUrl call, and see if you get a better result.
If that works you can do this globally with ImageProcessor events in a Composer / Componet:
public class ImageProcessorComposer : IUserComposer
{
public void Compose(Composition composition)
{
composition.Components().Append<ImageProcessorComponent>();
}
}
public class ImageProcessorComponent : IComponent
{
public void Initialize()
{
ImageProcessingModule.ValidatingRequest += OnImageProcessingValidatingRequest;
}
private void OnImageProcessingValidatingRequest(object sender, ValidatingRequestEventArgs e)
{
var queryString = HttpUtility.ParseQueryString(e.QueryString);
if (queryString.Get("upscale") == null)
{
queryString["upscale"] = "0";
}
e.QueryString = queryString.ToString();
}
public void Terminate()
{
}
}
Poor Image Quality Umbraco 8
Hey all,
I'm new to Umbraco and I've started to develop my first website with it. It seems to work nice with the building blocks you can custom create to put together a page. But I keep having this issue with images.
When I use the getCropUrl method with the right parameters I get an image returned with the correct url. It has the width, height & quality in it. But for some reason the quality is poor, even at quality 100. When I change it to for example quality 20 it seems to work, it gets worse. So What I think is that either the image is already getting downscaled on upload or the quality 100 is also getting downscaled but with "minimal" loss. But the "minimal" loss is too big in my opinion, I'm not happy with this result, I want sharp images.
PS: I'm using Azure Blob Storage.
Does anyone have a solution? I've seen a lot of people complain about this.
Kind regards, Jonathan
Hi Jonathan,
Is the image you are using smaller than your crop size? If so you might be seeing upscaling, try adding
furtheroptions: "&upscale=0"
to your GetCropUrl call, and see if you get a better result.If that works you can do this globally with ImageProcessor events in a Composer / Componet:
Hey Matthew,
thanks for the answer! But the images I uploaded are large than the crop. So I don't think that is the issue.
is working on a reply...