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/
66 stars 19 forks source link

fix: add conditional for `srcDir` configuration #18

Closed fabio-nettis closed 1 year ago

fabio-nettis commented 1 year ago

Description

Resolves an issue where an error would be generated due to an invalid src directory when accessing any media whatsoever.

Fixes #17

Type of change

Checklist:

stafyniaksacha commented 1 year ago

Hello @fabio-nettis Sorry for the delay!

I just want to know in which case those values are unset? (It shouldn't as they are core values)

If they are unset, maybe they are no public file served (maybe due to a user config?)

fabio-nettis commented 1 year ago

Hello @stafyniaksacha

Problematically the error appears in a extremely large project with a lot of customization, thus it is really hard to say what exactly goes into play when creating the error.

If you want I can try to create a minimal setup example and try to reproduce the error.

fabio-nettis commented 1 year ago

I am not able to reproduce the error with a fresh instance of Strapi. Closing for now because of missing reproducibility.