WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 3 weeks ago

#53941 new defect (bug)

When converting images after uploading the original image may not be converted

Reported by: azaozz Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.8
Component: Media Keywords: needs-patch
Focuses: Cc:

Description

This is less noticeable when the original image is larger than the "big image threshold" (and not a PNG) as the scaled image is converted.

To reproduce:

  • Set image conversion, for example GIF to JPEG.
  • Upload image.gif that is smaller than 2560x2560px.
  • Note that image.gif is listed in the Gallery and present in the uploads directory but it's sub-sizes have been converted to JPEGs like image-150x150.jpg, etc.

Expected behavior: the original image should be converted.

Change History (5)

#1 follow-up: @costdev
4 months ago

Hi @azaozz, thanks for raising this ticket!

Can you also add how you're setting the image conversion, for example GIF to JPEG?

I assume that you're using something akin to this?

<?php

add_filter(
        'image_editor_output_format',
        function( $formats ) {
                $formats['image/gif'] = 'image/jpeg';

                return $formats;
        }
);
Last edited 4 months ago by costdev (previous) (diff)

#2 in reply to: ↑ 1 @azaozz
4 months ago

Replying to costdev:

Yes, using the image_editor_output_format filter.

#3 @azaozz
4 months ago

  • Keywords needs-patch added

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


4 weeks ago

#5 @desrosj
3 weeks ago

  • Milestone changed from 5.9 to Future Release

Since there's still no patch here, I'm going to punt to Future Release. Feel free to move it back to a numbered milestone once a patch is worked out.

Note: See TracTickets for help on using tickets.