Removed .bmp from list of allowed image extensions for thumbs gen
Sharp doesn't support BMP format

Increased seek timestamp for video thumbs gen from 1% to 20%
This commit is contained in:
Bobby Wibowo 2019-01-18 10:25:30 +07:00
parent 209f5429cd
commit 8482049584
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -13,7 +13,7 @@ const thumbsDir = path.join(uploadsDir, 'thumbs')
const thumbUnavailable = path.join(__dirname, '../public/images/unavailable.png')
const cloudflareAuth = config.cloudflare.apiKey && config.cloudflare.email && config.cloudflare.zoneId
utilsController.imageExtensions = ['.webp', '.jpg', '.jpeg', '.bmp', '.gif', '.png', '.tiff', '.tif', '.svg']
utilsController.imageExtensions = ['.webp', '.jpg', '.jpeg', '.gif', '.png', '.tiff', '.tif', '.svg']
utilsController.videoExtensions = ['.webm', '.mp4', '.wmv', '.avi', '.mov', '.mkv']
utilsController.mayGenerateThumb = extname => {
@ -202,7 +202,7 @@ utilsController.generateThumbs = (name, force) => {
// Otherwise video extension
ffmpeg(path.join(__dirname, '..', config.uploads.folder, name))
.thumbnail({
timestamps: ['1%'],
timestamps: ['20%'],
filename: '%b.png',
folder: path.join(__dirname, '..', config.uploads.folder, 'thumbs'),
size: '200x?'