-
Bug
-
Resolution: Fixed
-
Neutral
-
3.2.4
-
None
-
-
Empty show more show less
-
Basel 30
-
5
DefaultImageGenerator and ImagingServlet (line ~98) used to hard-code the mime-type based on the imaging variation "outputFormat", which in many situations equals the filename extension:
// we need to set mimetype here explicitly because extension (and type) is determined at runtime depending on what the image op chain does response.setContentType("image/" + outputFormat);
This was not correct, in particular for the extension "jpg" (a valid file extension for JPEGs) the resulting mime-type image/jpg is not the correct mime-type for JPEGs* (which needs to be image/jpeg).
While most browsers seem to cope with image/jpg, some (eg IE11) do not. The result is that image variations of jpg images are not displayed for us in IE11.
Fix of MGNLIMG-171
This problem was targeted with issue MGNLIMG-171 and now the ImagingServlet will correctly return the mime-type image/jpeg for extension "jpg" according to the given output format.
Remaining todo
However, CachingImageStreamer still persists cached images with the wrong property jcr:mimeType.
This is not causing the output to be returned with the wrong mime-type as the servlet will still correctly determine the content-type from the output format, but this should be fixed nevertheless.
See CachingImageStreamer line 220:
imageData.setAttribute(FileProperties.PROPERTY_CONTENTTYPE, "image/" + generator.getOutputFormat(parameterProvider).getFormatName());
- is depended upon by
-
MGNLSTK-1515 Make the list of STKAssetRenderer's allowed image types configurable
- Closed
- is related to
-
MGNLIMG-168 Variation with png images leads to black background instead of transparent background
- Closed
- relates to
-
MGNLIMG-171 Set contentType correctly in ImagingServlet
- Closed