Does GetCropUrl resize the image and change width/height before it is sent to the browser?
So I know if you have an image that is 1MB and it's original size is 1280X760 and in the html, you do something like:
<img src="image-url" width="400" height="400"/>
It will change the dimensions of the image, but it doesn't change the file size, so the browser still downloads the original image. Is this the case with the image processor when I do something like:
image.GetCropUrl(400,400)
Does it resize the file size and/or change the width and height before sending it to the client? Also, I noticed if I have resize the image to something like 50,50, it looks blurry, is there a way to avoid this with ImageCropper?
Also, I am using GetCropUrl on images that are picked from the media picker. DoesGetCropUrl still have the same effect on my images even though I am not using theImageCropper data type?
Yes it makes a new file, so it resizes the file. I guess you could have checked that with developer tools ;)
If you use image.GetCropUrl(50,50) and render that with <img src="image-url" width="400" height="400"/> it will look blurry, but if you render at normal size, it shouldnt.
Yes, I actually did look at developer tools, but just wanted to confirm it. Do you know how I can keep the original center of the image when cropping? Is there a certain mode?
Using image.GetCropUrl(400,400) will use the focal point (blue dot) for the centre of the crop, do you want to override this and make it always centre?
Does GetCropUrl resize the image and change width/height before it is sent to the browser?
So I know if you have an image that is
1MB
and it's original size is1280X760
and in the html, you do something like:It will change the dimensions of the image, but it doesn't change the file size, so the browser still downloads the original image. Is this the case with the image processor when I do something like:
Does it
resize
thefile size
and/or change thewidth
andheight
before sending it to the client? Also, I noticed if I have resize the image to something like 50,50, it looks blurry, is there a way to avoid this with ImageCropper?Also, I am using
GetCropUrl
on images that are picked from the media picker. DoesGetCropUrl
still have the same effect on my images even though I am not using theImageCropper
data type?Yes it makes a new file, so it resizes the file. I guess you could have checked that with developer tools ;)
If you use
image.GetCropUrl(50,50)
and render that with<img src="image-url" width="400" height="400"/>
it will look blurry, but if you render at normal size, it shouldnt.If you want better responsive images, take a look at the Slimsy Package https://our.umbraco.org/projects/website-utilities/slimsy/
Yes, I actually did look at developer tools, but just wanted to confirm it. Do you know how I can keep the original center of the image when cropping? Is there a certain mode?
Using
image.GetCropUrl(400,400)
will use the focal point (blue dot) for the centre of the crop, do you want to override this and make it always centre?I'm not sure at the moment but i think there are options for the method call to provide some options like centering and so on.
But can't say for sure out if the box
is working on a reply...