Is ther a way of calling a crop by name and telling it what width or height to be? I was also interested to know if, having set the size, does Slimsy then create an image file of the right size so for mobiles you're not downloading huge file sizes unnecessarily?
If you haven't seen it yet, then try to see http://uhangout.co.uk/video/bQsvGmnYaUU this epoisode of uHangout. Jeavon will explain how to use the cropper in Umbraco 7 and he also explain how easy it is to do responsive imaging with Slimmage and Umbraco in the last part of the video.
Yes it's possible, but I'm not sure why you would need to as your predefined crop will already have a width & height? Remember with Slimmage the width and height are only used to define the ratio between width and height.
On your second question, the image loaded on a mobile will be to the closest 160 pixels but also likely to have a pixel density so it might be twice to three times that size but it will be to most appropriate for the device.
The reason I'm asking is because when using just GetResponsiveCropUrl, if I right click the image and view in a separate tab, the image is shown full size. That tells me the image was transmitted at full file size and not at the reduced file size. Typing this, I think I've just twigged. The new browser window won't be sending back the javascript call to Slimmage so it calls the raw image file..... correct?
The reason I wanted to set the size, (as I've now moved on with the page I'd had other issues with) is that I have 5 icons that are actually 109 x 109 and am calling a GetResponsiveCropUrl("correctCropName") that is set to 109 x 109 but what I see is 5 icons that are 160 x 160 on the desktop version. I'd expect them to be no bigger than 109 on the desktop and get smaller if required by the smaller screensize. Is the way to do this by setting a class, a max-width and media query then?
Crop name and size
Is ther a way of calling a crop by name and telling it what width or height to be? I was also interested to know if, having set the size, does Slimsy then create an image file of the right size so for mobiles you're not downloading huge file sizes unnecessarily?
Thanks,
Craig
Hi Craig,
If you haven't seen it yet, then try to see http://uhangout.co.uk/video/bQsvGmnYaUU this epoisode of uHangout. Jeavon will explain how to use the cropper in Umbraco 7 and he also explain how easy it is to do responsive imaging with Slimmage and Umbraco in the last part of the video.
Hope this helps,
/Dennis
Yes it's possible, but I'm not sure why you would need to as your predefined crop will already have a width & height? Remember with Slimmage the width and height are only used to define the ratio between width and height.
On your second question, the image loaded on a mobile will be to the closest 160 pixels but also likely to have a pixel density so it might be twice to three times that size but it will be to most appropriate for the device.
Jeavon
Thanks Jeavon & Dennis,
The reason I'm asking is because when using just GetResponsiveCropUrl, if I right click the image and view in a separate tab, the image is shown full size. That tells me the image was transmitted at full file size and not at the reduced file size. Typing this, I think I've just twigged. The new browser window won't be sending back the javascript call to Slimmage so it calls the raw image file..... correct?
Craig
The reason I wanted to set the size, (as I've now moved on with the page I'd had other issues with) is that I have 5 icons that are actually 109 x 109 and am calling a GetResponsiveCropUrl("correctCropName") that is set to 109 x 109 but what I see is 5 icons that are 160 x 160 on the desktop version. I'd expect them to be no bigger than 109 on the desktop and get smaller if required by the smaller screensize. Is the way to do this by setting a class, a max-width and media query then?
Cheers,
Craig
Yes, you should have max-width set to what you want, ideally using a percentage value.
is working on a reply...