sulu: Some images cannot be converted but no error messages.
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Sulu Version | 2.0.1 |
Browser Version | Chromium 78.0.3904.70 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit) |
Actual Behavior
- Randomly selected JPG is uploaded but not rendered to other format/size per any request
Expected Behavior
Image should be converted from uploaded image format/size to other format/size.
When this error would occur, error message should be displayed since it confuses the developer and user otherwise.
Also, when URL of a to-be-converted image is directly accessed, no error is displayed. Instead 404 is returned (e.g: http://somesite.local/uploads/media/sulu-400x400-inset/08/48-IMG_20160716_165446.png?v=1-0)
Steps to Reproduce
Scenario 1. Try couple of random jpg images or use one from the attachment. This is the output of linux’s file command for the example “bad” image:
# file /tmp/CCB_icon_logo.jpg
/tmp/CCB_icon_logo.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=7, orientation=upper-left, xresolution=98, yresolution=106, resolutionunit=2, software=Adobe Photoshop CS6 (Windows), datetime=2019:05:22 23:42:16], baseline, precision 8, 1024x1024, frames 3
Images for testing:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (10 by maintainers)
I think for the moment we will leave the error code as it is, so I am going to close this issue.
@vladimirdjuricic sulu use Imagick if Imagick extension is enabled. https://github.com/sulu/sulu/blob/8b8c674c5f9254ceab0014095387c11ee004a603/src/Sulu/Bundle/MediaBundle/DependencyInjection/SuluMediaExtension.php#L258
When you disable imagick you also need to rebuild the cache (
bin/websiteconsole cache:clear
) else it will still try to use imagick.You can force also a specific adapter by configure it e.g.:
Sulu uses imagine as abstraction to convert images.