Make WordPress Core


Ignore:
Timestamp:
02/02/2024 05:46:50 PM (3 months ago)
Author:
adamsilverstein
Message:

Media: enable AVIF support.

Add support for uploading, editing and saving AVIF images when supported by the server.

Add 'image/avif' to supported mime types. Correctly identify AVIF images and sizes even when PHP doesn't support AVIF. Resize uploaded AVIF files (when supported) and use for front end markup.

Props adamsilverstein, lukefiretoss, ayeshrajans, navjotjsingh, Tyrannous, jb510, gregbenz, nickpagz, JavierCasares, mukesh27, yguyon, swissspidy.
Fixes #51228.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/vendor/plupload/handlers.js

    r57231 r57524  
    609609                    up.removeFile( file );
    610610                    return;
     611                } else if ( file.type === 'image/avif' && up.settings.avif_upload_error ) {
     612                    // Disallow uploading of AVIF images if the server cannot edit them.
     613                    wpQueueError( pluploadL10n.noneditable_image );
     614                    up.removeFile( file );
     615                    return;
    611616                }
    612617
Note: See TracChangeset for help on using the changeset viewer.