mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-11777] Add WebP preview support on web (#25784)
* Add webp to webapp image extension list * Add test webp image and test code * Change webp test image and move path --------- Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
BIN
e2e-tests/cypress/tests/fixtures/mm_file_testing/Images/WEBP.webp
vendored
Normal file
BIN
e2e-tests/cypress/tests/fixtures/mm_file_testing/Images/WEBP.webp
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -103,6 +103,18 @@ describe('Upload Files - Image', () => {
|
||||
|
||||
testImage(properties);
|
||||
});
|
||||
|
||||
it('MM-T2264_7 - WEBP', () => {
|
||||
const properties = {
|
||||
filePath: 'mm_file_testing/Images/WEBP.webp',
|
||||
fileName: 'WEBP.webp',
|
||||
originalWidth: 640,
|
||||
originalHeight: 426,
|
||||
mimeType: 'image/webp',
|
||||
};
|
||||
|
||||
testImage(properties);
|
||||
});
|
||||
});
|
||||
|
||||
function testImage(properties) {
|
||||
|
||||
@@ -1460,7 +1460,7 @@ export const Constants = {
|
||||
DEFAULT_CHARACTER_LIMIT: 4000,
|
||||
IMAGE_TYPE_GIF: 'gif',
|
||||
TEXT_TYPES: ['txt', 'rtf', 'vtt'],
|
||||
IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg', 'tiff', 'tif', 'psd'],
|
||||
IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg', 'tiff', 'tif', 'psd', 'webp'],
|
||||
AUDIO_TYPES: ['mp3', 'wav', 'wma', 'm4a', 'flac', 'aac', 'ogg', 'm4r'],
|
||||
VIDEO_TYPES: ['mp4', 'avi', 'webm', 'mkv', 'wmv', 'mpg', 'mov', 'flv'],
|
||||
PRESENTATION_TYPES: ['ppt', 'pptx'],
|
||||
|
||||
Reference in New Issue
Block a user