Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Craig100 1069 posts 2335 karma points c-trib
    Feb 18, 2015 @ 01:46
    Craig100
    0

    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

  • Dennis Aaen 4453 posts 17963 karma points admin hq c-trib
    Feb 18, 2015 @ 07:04
    Dennis Aaen
    0

    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

  • Jeavon Leopold 3005 posts 13196 karma points MVP 7x admin c-trib
    Feb 18, 2015 @ 08:35
    Jeavon Leopold
    0

    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

  • Craig100 1069 posts 2335 karma points c-trib
    Feb 18, 2015 @ 12:20
    Craig100
    0

    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

  • Craig100 1069 posts 2335 karma points c-trib
    Feb 22, 2015 @ 01:38
    Craig100
    0

    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

  • Jeavon Leopold 3005 posts 13196 karma points MVP 7x admin c-trib
    Feb 25, 2015 @ 20:27
    Jeavon Leopold
    0

    Yes, you should have max-width set to what you want, ideally using a percentage value.

Please Sign in or register to post replies

Write your reply to:

Draft