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/
65 stars 17 forks source link

breaks the video #4

Closed jumpersib closed 1 year 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)