Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31258

"scaledown" image filters crop when they shouldn't

    XMLWordPrintable

Details

    Description

      All "scaledown" aliases (https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/Resources/config/image.yml#L174) are using the "outbound" thumbnail mode. This is because the Liip thumbnail filter loader is expecting the text "inset" (https://github.com/liip/LiipImagineBundle/blob/master/Imagine/Filter/Loader/ThumbnailFilterLoader.php#L25) instead of "ImageInterface::THUMBNAIL_INSET" (https://github.com/ezsystems/ezpublish-kernel/blob/7.5/eZ/Bundle/EzPublishCoreBundle/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php#L30). As a result, the image aliases are subject to undesirable cropping.

      Steps to reproduce:
      1. Create a new image variation as follows (please verify presented configuration against scaleheightdownonly and scalewidthdownonly filters):

      image_variations:
          test:
              reference: null
                  filters:
                      - { name: geometry/scaledownonly, params: [50, 50] }
      

      2. Clear the Symfony cache and persistence cache:

      php bin/console cache:clear
      php bin/console cache:pool:clear cache.app

      3. Create a new article and add an image with a width bigger than 50 to see the result of scaling.
      4. Apply "test" variation to this image.
      5. Publish the article.

      Result:
      The image is properly scaled but unneeded cropping is applied.

      Expected result:
      The image should be only scaled.

      Attachments

        Activity

          People

            Unassigned Unassigned
            3427b0be-ab4e-4614-8af1-1719f7f23944@accounts.ibexa.co Peter Keung
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: