Copied to clipboard

Flag this post as spam?

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


This forum is in read only mode, you can no longer reply
  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Sep 19, 2017 @ 11:03
    Ismail Mayat
    0

    How to get blob cache image

    Hello,

    I am having a weird issue with a couple of images on my site where they are not resizing. It seems to be 3 images. No errors in log etc just the image refuses to resize. I wanted to check the blob cache however not sure how to find the image in blob cache.

    I know from looking at source that the cache folder structure is based on first 6 chars from sha1 hash of image path. I tried this but I get 4 chars of folders then remaining 2 chars never match. I have been generating the sha1 by using http://www.sha1-online.com/ and putting in url like:

    https://www.stormmanagement.com/media/37033/heroimage15b.jpg?crop=0.1203125,0,0.3796875,0&cropmode=percentage&width=320&height=240&rnd=131499458850000000

    Is this correct? Also if you hit that url you can see that image is not resized.

    I am using ImageProcessor 2.5.2 imageprocessor.web 4.8.2 ImageProcessor.Web.Config 2.3.0.0 ImageProcessor.Web.Plugins.AzureBlobCache 1.1.3.0

    Regards

    Ismail

  • James Jackson-South 489 posts 1747 karma points c-trib
    Sep 20, 2017 @ 23:57
    James Jackson-South
    0

    Hi Ismail,

    You need to factor into the equation the last-write-time of the file, the folder depth is configurable also.

    I've written helpers that you can use for this anyway.

    https://github.com/JimBobSquarePants/ImageProcessor/blob/develop/src/ImageProcessor.Web/Caching/CachedImageHelper.cs#L23

    Since I don't have an image to check against. I'm going to assume that the images are simply massive and you're running out of contiguous memory. When that happens I just return the original so the website doesn't explode.

    You'd need to register an ILogger implementation via ImageProcessorBootstrapper.Instance.SetLogger(). There's one in the Umbraco source already (v7.4+ I think) but it's not registering and I need to investigate that.

    Hope that helps.

    Cheers

    James

    P.S Upgrade your versions, I only support the latest.

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Sep 21, 2017 @ 08:08
    Ismail Mayat
    0

    James,

    Cool. I will try the upgrade see if that fixes the issue and maybe turn on some logging.

    Regards

    Ismail

  • James Jackson-South 489 posts 1747 karma points c-trib
    Sep 21, 2017 @ 12:40
    James Jackson-South
    0

    Upgrading won't make a difference if you are trying to resize massive images.

    Is that the case?

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Sep 21, 2017 @ 12:49
    Ismail Mayat
    0

    James,

    The image is about 1.7mb also same image on our dev / staging and azure staging resizes fine. In my original post there is link an image with the resizing parameters being used.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Sep 21, 2017 @ 13:48
    Ismail Mayat
    0

    James,

    See this image

    This is 700k image which refuses to resize.

    Regards

    Ismial

  • James Jackson-South 489 posts 1747 karma points c-trib
    Sep 21, 2017 @ 15:33
    James Jackson-South
    0

    Hi Ismail,

    That first link you posted led me to an error page,.

    The more recent link is not a resize operation, it's a cropping and resizing one.

    The cropping instructions are completely incorrect. https://www.stormmanagement.com/media/37099/heroimage16a.jpg?crop=0.36222222222222222,%200,%200.13777777777777778,%200&cropmode=percentage&width=1536&height=1152&rnd=131504740850000000

    When using a percentage, cropping instruction the values are supposed to be decimals between 0 and 100.

    Removing those instructions and using resize works well.

    http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/crop/

    Cheers

    James

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Sep 21, 2017 @ 15:45
    Ismail Mayat
    0

    James,

    Cheers will investigate further.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Sep 21, 2017 @ 16:21
    Ismail Mayat
    0

    James,

    I tried the following

    https://www.stormmanagement.com/media/37099/heroimage16a.jpg?width=765&height=576&rnd=131504740850000000

    So took out crop information completly and it still does not resize?

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft