Review main Abandoned

45204[BUGFIX] Show thumbnail and preview of images in CE with fixed size

Michael Oehlhof CR 0 V 0 Easy +4 −4 updated 04/09/16, 21:04

Commit message

When an image was deleted in the filesystem then in the CE it was shown
with the original size instead of the preview or thumbnail size.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 9

  1. Michael Oehlhof uploaded patch set 1 12/11/15, 00:15

  2. Frans Saris commented on patch set 1 CR -1 12/11/15, 07:25

    InlineRecordContainer.php:339

    Do not think a <img tag supports this syntax. I think we should adjust the if ($processedImage->getProperty('width')) { check to see the image is available

    ImageManipulationElement.php:199

    same here
  3. Michael Oehlhof commented on patch set 1 12/11/15, 12:10

    I think the problem is that the function isUnchanged() results true, what is correct for the processed file, but results in returning the width and height of the original file that is wrong for the use in the list of images in the CE. In the image list of the CE we should use fixed width and height instead of the values of the processed image.
  4. Frans Saris commented on patch set 1 12/11/15, 12:16

    Maybe if (!$processedImage->getOriginalFile()->isMissing() && $processedImage->getProperty('width')) { could be a solution
  5. Michael Oehlhof commented on patch set 1 12/11/15, 12:47

    I tested it, but the property "missing" has the value "0" even if the file does not exist. Looks like the information is only read from the database and no file exist happened.
  6. Michael Oehlhof uploaded patch set 2 12/12/15, 18:23

  7. Markus Sommer commented on patch set 2 CR -1 03/18/16, 08:25

    InlineRecordContainer.php:339

    The use of »%« is not recommendable. This works only if the wrapper has a height. And does not look good http://codepen.io/markussom/pen/jqyemO

    ImageManipulationElement.php:204

    The use of »%« is not recommendable. This works only if the wrapper has a height. And does not look good http://codepen.io/markussom/pen/jqyemO
  8. Frans Saris commented on patch set 2 03/18/16, 09:48

    when does this situation exactly happen, when the original file is deleted?

    InlineRecordContainer.php:339 Reply

    indeed we need to add a fixed with to properly support svg
  9. Mathias Schreiber abandoned the change 04/09/16, 21:04

    abandoned, won't fix