Search code examples
djangowebserverpng

Images that fit the regexp `/.*-ad[0-9]\.png/` can not be loaded in any browser?


I had this weird problem of identical PNG images created with drf-extra-fields's Base64ImageField with different file names not being loaded.

Problem persists both in Django development server and nginx serving the image files so I don't think it is specific to Django or nginx.

I experimented with different file names and some work and some don't:

0-ad0.png # Doesn't work
a-ad0.png # Doesn't work
aaaaaa-ad0.png # Doesn't work
0-ae0.png # Works
0-bd0.png # Works
0-ada.png # Works
a-ad.png # Works
a-ad00.png # Works

As far as I can tell, if the file name fits this regular expression, it is not loaded: /.*-ad[0-9]\.png/ Did anyone encounter such a thing? What could be the reason for this?

EDIT: here's what firefox is showing me: enter image description here


Solution

  • Do you have an ad blocker enabled? "-ad0." is in the adblock plus list.