[Answered ]-Ico files displayed but not jpg/png, {% load staticfiles %} breaks the code

2👍

Your code is correct

- url: /image\.jpg
  static_files: image.jpg
  upload: image\.jpg

and your images should be “visible” in static directory:

- url: /static
  static_dir: static

Just make sure that these declarations are before you reference by package name:

- url: .*
  script: your.app

In this case you won’t need to {% load staticfiles %}. But your 500 error could be because of using older django versions as before 1.4 it was {% load static %}

👤Irene

Leave a comment