Skip to content

Commit

Permalink
Merge pull request #35 from koty10/add-avif-support
Browse files Browse the repository at this point in the history
feat(core): Add support for afiv format
  • Loading branch information
m5kr1pka authored Nov 30, 2024
2 parents 1c53948 + 433efea commit f3e084d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export function getImageSequence(imageName: string): string {
export function getFileSuffix(fileName: string): string {
const ext = fileName.split('.').pop() || ' ';

if (!['jpg', 'jpeg', 'png', 'webp'].includes(ext)) {
if (!['jpg', 'jpeg', 'png', 'webp', 'avif'].includes(ext)) {
throw new AppError(`Image with extension ['${ext}'] is not supported.`);
}

Expand All @@ -205,4 +205,4 @@ export function getPathEnding(path: string): string {
const splitted = path.split('/');

return splitted.pop() || '';
}
}

0 comments on commit f3e084d

Please sign in to comment.