fix: image resize tiff files (#5449)
This commit is contained in:
@@ -287,6 +287,7 @@ export default buildConfigWithDefaults({
|
||||
'image/jpeg',
|
||||
'image/gif',
|
||||
'image/svg+xml',
|
||||
'image/tiff',
|
||||
'audio/mpeg',
|
||||
],
|
||||
imageSizes: [
|
||||
|
||||
@@ -15,6 +15,7 @@ import { RESTClient } from '../helpers/rest.js'
|
||||
import { adminThumbnailSrc } from './collections/admin-thumbnail/RegisterThumbnailFn.js'
|
||||
import config from './config.js'
|
||||
import { adminThumbnailSlug, audioSlug, mediaSlug, relationSlug } from './shared.js'
|
||||
|
||||
const filename = fileURLToPath(import.meta.url)
|
||||
const dirname = path.dirname(filename)
|
||||
|
||||
@@ -155,6 +156,17 @@ describe('uploads', () => {
|
||||
await expect(iconMeta).toContainText('16x16')
|
||||
})
|
||||
|
||||
test('should resize and show tiff images', async () => {
|
||||
await page.goto(mediaURL.create)
|
||||
await page.setInputFiles('input[type="file"]', path.resolve(dirname, './test-image.tiff'))
|
||||
|
||||
await expect(page.locator('.file-field__upload .thumbnail svg')).toBeVisible()
|
||||
|
||||
await saveDocAndAssert(page)
|
||||
|
||||
await expect(page.locator('.file-details img')).toBeVisible()
|
||||
})
|
||||
|
||||
test('should show draft uploads in the relation list', async () => {
|
||||
await page.goto(relationURL.list)
|
||||
|
||||
|
||||
BIN
test/uploads/test-image.tiff
Normal file
BIN
test/uploads/test-image.tiff
Normal file
Binary file not shown.
Reference in New Issue
Block a user