imageTransform is re-compressing (even when no changes) unless imageTransformOutputMimeType is set
Logs
n/a
To Reproduce
FilePond.registerPlugin(
FilePondPluginFileValidateSize,
FilePondPluginImageExifOrientation,
FilePondPluginImagePreview,
FilePondPluginImageTransform
);
// do not set resize, crop, or set any other transform related options (other than those below) to isolate bug
Case 1
FilePond.setOptions({
// do not set imageTransformOutputMimeType
});
upload a jpeg
imageTransform will transform (re-compress) the jpeg
upload a jpeg
imageTransform will not transform the jpeg
Expected behavior
Case 1: imageTransform should not transform (re-compress) the jpeg since the mime type has not changed. One way around this is to set imageTransformOutputQualityMode: 'optional'. However, this is only works if imageTransformOutputQuality is set to a number (not browser default), so basically, to preserve mime type and avoid recompression one is forced to set imageTransformOutputQualityMode: 'optional' and imageTransformOutputQuality to a number.
Describe the bug
imageTransform is re-compressing (even when no changes) unless imageTransformOutputMimeType is set
Logs
n/a
To Reproduce
Case 1
upload a jpeg imageTransform will transform (re-compress) the jpeg
Case 2
upload a jpeg imageTransform will not transform the jpeg
Expected behavior Case 1: imageTransform should not transform (re-compress) the jpeg since the mime type has not changed. One way around this is to set
imageTransformOutputQualityMode: 'optional'
. However, this is only works ifimageTransformOutputQuality
is set to a number (not browser default), so basically, to preserve mime type and avoid recompression one is forced to setimageTransformOutputQualityMode: 'optional'
andimageTransformOutputQuality
to a number.Case 2: behaving as expected.
Stacktraces
n/a
Information about your project:
Windows 10, latest firefox, latest filepond
Additional context
n/a