# STATIC FILES and newly generated images....

**URL:** <https://forum.djangoproject.com/t/static-files-and-newly-generated-images/24535>\
**Category:** Deployment\
**Created:** [October 15, 2023, 2:29pm UTC](https://forum.djangoproject.com/t/static-files-and-newly-generated-images/24535 "2023-10-15T14:29:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 16, 2023, 12:28am UTC](https://forum.djangoproject.com/t/static-files-and-newly-generated-images/24535/2 "2023-10-16T00:28:08Z")

</div>

`STATIC_FILES` and `MEDIA_FILES` are two different things, and should reside in two different directories. The `collectstatic` command has _nothing_ to do with media files.

To make media files available, you need to ensure your webserver is configured to serve the directory where those files are stored (`MEDIA_ROOT`), and the urls are generated using the `url` attribute of the filefield object and not using the `static` tag. (See [Model field reference | Django documentation | Django](https://docs.djangoproject.com/en/4.2/ref/models/fields/#filefield-and-fieldfile) and the examples at [Managing files | Django documentation | Django](https://docs.djangoproject.com/en/4.2/topics/files/#using-files-in-models))

---

_[View the full topic](https://forum.djangoproject.com/t/static-files-and-newly-generated-images/24535)._
