Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#54146 closed defect (bug) (fixed)

The extension "webp" is missing

Reported by: almendron Owned by: adamsilverstein
Priority: normal Milestone: 5.9
Component: Media Version: 5.8.1
Severity: normal Keywords:
Cc: Focuses:

Description

File wp-includes/js/media-views.js
Line 3449

return /\.(jpe?g|png|gif)$/i.test( attachment.get('filename') );

File wp-includes/js/dist/block-editor.js
Line 26680

}) => /^image\/(?:jpe?g|png|gif)$/.test(type)); // Only process files if no HTML is present.

Line 30251

}) => /^image\/(?:jpe?g|png|gif)$/.test(type)).map(file => `<img src="${Object(external_wp_blob_["createBlobURL"])(file)}">`).join('');

File wp-includes/js/plupload/wp-plupload.js
Line 379

mage = /(?:jpe?g|png|gif)$/i.exec( file.name );

Change History (7)

#1 @adamsilverstein
5 years ago

  • Owner set to adamsilverstein
  • Status new → assigned

Hi @almendron - thanks for the bug report.

Did you notice any effect of the missing webp extension in each of these cases? I agree thee likely need updating, however it would be good to understand what each does so we can document and test that the change fixes an issue.

#2 @almendron
5 years ago

File wp-includes/js/media-views.js: https://core.trac.wordpress.org/ticket/53917

Rest of cases: not verified.

Version 0, edited 5 years ago by almendron (next)

#3 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review → 5.9

#4 @adamsilverstein
5 years ago

I believe the usage in wp-includes/js/dist/block-editor.js comes from Gutenberg.

I opened this PR to updates usages in Gutenberg (although I don't know exactly how these are used, I assume webp should be added): ​https://github.com/WordPress/gutenberg/pull/36361

cc: @gziolo

This ticket was mentioned in ​Slack in #core by audrasjb. ​View the logs.


5 years ago

#6 @adamsilverstein
5 years ago

This is fixed upstream in ​https://github.com/WordPress/gutenberg/pull/36361 which I just merged. Marking this ticket as resolved.

@almendron let me know if you still see this issue anywhere, thanks again for raising.

#7 @adamsilverstein
5 years ago

  • Resolution → fixed
  • Status assigned → closed
Note: See TracTickets for help on using tickets.