Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-5885

Max height and width properties for displaying images in template should consider same size (patch included)

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.20.08, 2.22.01, 2.23.01-alpha
    • 2.20.09, 2.22.02, 2.23.02-alpha
    • cms7-release
    • None

    Description

      The properties display.max.width and display.max.height that can be configured on /hippo:namespaces/hippogallery/image/editor:templates/default/display to check if an image needs to be displayed in the template of the imageset, are now used to check if the image size is SMALLER than the max width/height. Because of this the value of the properties needs to be 1px larger than the image.

      For example:
      Image size: 1280 x 735 px
      display.max.width: 1281px
      display.max.height: 736px

      The fix: In the class org.hippoecm.frontend.plugins.gallery.editor.ImageDisplayPlugin
      method: shouldDisplayImage(...)

      return width <= maxWidth && height <= maxHeight;

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            rlinden Roberto van der Linden (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: