strapi-community / strapi-plugin-local-image-sharp

Dynamically resize, format and optimize images based on url modifiers.
https://strapi-community.github.io/strapi-plugin-local-image-sharp/
67 stars 19 forks source link

breaks the video #4

Closed jumpersib closed 2 years ago

jumpersib commented 2 years ago

breaks the video, please add a check for the correct format (only for images), something like this:

const allowType = ['JPEG', 'PNG', 'GIF', 'SVG', 'TIFF', 'ICO', 'DVU'];

// firstSegment this is a variable from your code if(!allowType.includes(firstSegment.split('.').pop().toUpperCase())) { await next() return }

jumpersib commented 2 years ago

i mean admin panel (500th error)