Skip to content

Commit

Permalink
Merge pull request #8737 from kavanagh21/patch-1
Browse files Browse the repository at this point in the history
Other (image): Add WEBP support to the inline pasting of images from source URLs.
  • Loading branch information
maxbarnas committed Feb 3, 2021
2 parents d0016b0 + 0e87c9c commit 48ad51d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ckeditor5-image/src/autoimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { insertImage } from './image/utils';

// Implements the pattern: http(s)://(www.)example.com/path/to/resource.ext?query=params&maybe=too.
const IMAGE_URL_REGEXP = new RegExp( String( /^(http(s)?:\/\/)?[\w-]+(\.[\w-]+)+[\w._~:/?#[\]@!$&'()*+,;=%-]+/.source +
/\.(jpg|jpeg|png|gif|ico|JPG|JPEG|PNG|GIF|ICO)\??[\w._~:/#[\]@!$&'()*+,;=%-]*$/.source ) );
/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)\??[\w._~:/#[\]@!$&'()*+,;=%-]*$/.source ) );

/**
* The auto-image plugin. It recognizes image links in the pasted content and embeds
Expand Down
1 change: 0 additions & 1 deletion packages/ckeditor5-image/tests/autoimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ describe( 'AutoImage - integration', () => {
'http://www.example.com',
'https://example.com',
'http://www.example.com/image.svg',
'http://www.example.com/image.webp',
'http://www.example.com/image.mp3',
'http://www.example.com/image.exe',
'http://www.example.com/image.txt',
Expand Down

0 comments on commit 48ad51d

Please sign in to comment.