Copied to clipboard

Flag this post as spam?

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


  • Martin Kyukov 36 posts 231 karma points
    Nov 12, 2018 @ 14:24
    Martin Kyukov
    0

    ImageProcessor not handling requests Umbraco 7.5.14

    ImageProcessor doesn't seem to be handling the query strings being passed with requests on a site running Umbraco 7.5.14. Nothing happens at all, and there's nothing in the logs. It works on another site running Umbraco 7.5.8 .

    packages.config:

      <package id="ImageProcessor" version="2.6.2.25" targetFramework="net452" />
      <package id="ImageProcessor.Web" version="4.9.3.25" targetFramework="net452" />
      <package id="ImageProcessor.Web.Config" version="2.3.0.0" targetFramework="net452" />
      <package id="ImageProcessor.Web.PostProcessor" version="1.2.3" targetFramework="net452" />
    

    proccessing.config

    <?xml version="1.0" encoding="utf-8"?>
    <processing preserveExifMetaData="true" fixGamma="false" interceptAllRequests="true" allowCacheBuster="true">
      <presets>
      </presets>
      <plugins>
        <plugin name="Alpha" type="ImageProcessor.Web.Processors.Alpha, ImageProcessor.Web"/>
        <plugin name="AutoRotate" type="ImageProcessor.Web.Processors.AutoRotate, ImageProcessor.Web" enabled="true"/>
        <plugin name="BackgroundColor" type="ImageProcessor.Web.Processors.BackgroundColor, ImageProcessor.Web" enabled="true"/>
        <plugin name="Brightness" type="ImageProcessor.Web.Processors.Brightness, ImageProcessor.Web"/>
        <plugin name="Contrast" type="ImageProcessor.Web.Processors.Contrast, ImageProcessor.Web"/>
        <plugin name="Crop" type="ImageProcessor.Web.Processors.Crop, ImageProcessor.Web" enabled="true"/>
        <plugin name="DetectEdges" type="ImageProcessor.Web.Processors.DetectEdges, ImageProcessor.Web"/>
        <plugin name="EntropyCrop" type="ImageProcessor.Web.Processors.EntropyCrop, ImageProcessor.Web"/>
        <plugin name="Filter" type="ImageProcessor.Web.Processors.Filter, ImageProcessor.Web"/>
        <plugin name="Flip" type="ImageProcessor.Web.Processors.Flip, ImageProcessor.Web"/>
        <plugin name="Format" type="ImageProcessor.Web.Processors.Format, ImageProcessor.Web" enabled="true"/>
        <plugin name="GaussianBlur" type="ImageProcessor.Web.Processors.GaussianBlur, ImageProcessor.Web">
          <settings>
            <setting key="MaxSize" value="22"/>
            <setting key="MaxSigma" value="5.1"/>
            <setting key="MaxThreshold" value="100"/>
          </settings>
        </plugin>
        <plugin name="GaussianSharpen" type="ImageProcessor.Web.Processors.GaussianSharpen, ImageProcessor.Web">
          <settings>
            <setting key="MaxSize" value="22"/>
            <setting key="MaxSigma" value="5.1"/>
            <setting key="MaxThreshold" value="100"/>
          </settings>
        </plugin>
        <plugin name="Halftone" type="ImageProcessor.Web.Processors.Halftone, ImageProcessor.Web"/>
        <plugin name="Hue" type="ImageProcessor.Web.Processors.Hue, ImageProcessor.Web"/>
        <plugin name="Mask" type="ImageProcessor.Web.Processors.Mask, ImageProcessor.Web">
          <settings>
            <setting key="VirtualPath" value="~/images/imageprocessor/mask/"/>
          </settings>
        </plugin>
        <plugin name="Meta" type="ImageProcessor.Web.Processors.Meta, ImageProcessor.Web"/>
        <plugin name="Overlay" type="ImageProcessor.Web.Processors.Overlay, ImageProcessor.Web">
          <settings>
            <setting key="VirtualPath" value="~/images/imageprocessor/overlay/"/>
          </settings>
        </plugin>
        <plugin name="Pixelate" type="ImageProcessor.Web.Processors.Pixelate, ImageProcessor.Web"/>
        <plugin name="Quality" type="ImageProcessor.Web.Processors.Quality, ImageProcessor.Web" enabled="true"/>
        <plugin name="ReplaceColor" type="ImageProcessor.Web.Processors.ReplaceColor, ImageProcessor.Web"/>
        <plugin name="Resize" type="ImageProcessor.Web.Processors.Resize, ImageProcessor.Web" enabled="true">
          <settings>
            <setting key="MaxWidth" value="5000"/>
            <setting key="MaxHeight" value="5000"/>
          </settings>
        </plugin>
        <plugin name="Rotate" type="ImageProcessor.Web.Processors.Rotate, ImageProcessor.Web"/>
        <plugin name="RotateBounded" type="ImageProcessor.Web.Processors.RotateBounded, ImageProcessor.Web"/>
        <plugin name="RoundedCorners" type="ImageProcessor.Web.Processors.RoundedCorners, ImageProcessor.Web"/>
        <plugin name="Saturation" type="ImageProcessor.Web.Processors.Saturation, ImageProcessor.Web"/>
        <plugin name="Tint" type="ImageProcessor.Web.Processors.Tint, ImageProcessor.Web"/>
        <plugin name="Vignette" type="ImageProcessor.Web.Processors.Vignette, ImageProcessor.Web"/>
        <plugin name="Watermark" type="ImageProcessor.Web.Processors.Watermark, ImageProcessor.Web"/>
      </plugins>
    </processing>
    

    security.config:

    <?xml version="1.0" encoding="utf-8"?>
    <security>
      <services>
        <!--<service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web" />-->
        <service prefix="remote.axd" name="RemoteImageService" type="ImageProcessor.Web.Services.RemoteImageService, ImageProcessor.Web">
          <settings>
            <setting key="MaxBytes" value="4194304"/>
            <setting key="Timeout" value="3000"/>
            <setting key="Protocol" value="http"/>
          </settings>
          <whitelist>
            <add url="https://api.instagram.com"/>
            <add url="https://scontent.cdninstagram.com"/>
          </whitelist>
        </service>
      </services>
    </security>
    

    cache.config:

    <?xml version="1.0" encoding="utf-8"?>
    <caching currentCache="DiskCache">
      <caches>
        <cache name="DiskCache" type="ImageProcessor.Web.Caching.DiskCache, ImageProcessor.Web" maxDays="365" browserMaxDays="7" trimCache="false">
          <settings>
            <setting key="VirtualCachePath" value="~/app_data/cache"/>
          </settings>
        </cache>
      </caches>
    </caching>
    

    Seems strange that there are no errors in the logs, but I really have no leads left to investigate - anyone had an issue like this before, or at least an idea what to look for?

  • Marc Goodson 2155 posts 14406 karma points MVP 9x c-trib
    Nov 18, 2018 @ 22:07
    Marc Goodson
    0

    Hi Martin

    Sure you probably have these, but as you don't explicitly say,,, wondering if you have got the HttpModules specified in the web.config?

    <!-- ImageProcessor.Web intercept module references -->
    <configuration>
      <system.web>
        <httpRuntime fcnMode="Single" />
        <httpModules>
          <add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web"/>
        </httpModules>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules>
          <add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web"/>
        </modules>
      </system.webServer>
    </configuration>
    

    ??

    other thought is, the security.config - usually if this isn't right, nothing happens - should the protocol be https? for your whitelisted urls?

    regards

    Marc

  • Martin Kyukov 36 posts 231 karma points
    Nov 19, 2018 @ 09:24
    Martin Kyukov
    0

    Hey Marc - apart from this line:

    <httpRuntime fcnMode="Single" />
    

    The rest of my Web.config related to ImageProcessor looks the same as the one you posted (+ the configs that point to the ImageProcessor configuration files).

    As for the http/https, the other solution that works has the protocol set to http as well and all works as expected.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 19, 2018 @ 09:27
    Dan Diplo
    0

    "ImageProcessor doesn't seem to be handling the query strings being passed with requests on a site running Umbraco 7.5.14. Nothing happens at all, and there's nothing in the logs."

    What makes you think it's not working? Could you provide a code example of how you are using it?

    Have you checked in ~/app_data/cache/ folder to see whether images are being cached there? If it's empty, does IIS have write permission to this folder?

  • Alexander Croner 71 posts 282 karma points
    Nov 19, 2018 @ 09:34
    Alexander Croner
    0

    Do you run this solution in Azure? I had a similar issue with wrong configuration to my Blobstorage.

  • Martin Kyukov 36 posts 231 karma points
    Nov 26, 2018 @ 12:13
    Martin Kyukov
    100

    The problem was that in security.config of ImageProcessor:

    <!--<service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web" />-->
    

    This line is commented out, so none of the files were being cached and used.

    After uncommenting this line out everything started to work just fine.

Please Sign in or register to post replies

Write your reply to:

Draft