Answer the question
In order to leave comments, you need to log in
Why are media files not showing up in heroku?
Uploaded a django project to heroku.
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'
# Extra places for collectstatic to find static files.
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
{% thumbnail item.image '282x160' crop='center' as im %}
<img class="lazyOwl" data-src="{{ im.url }}" alt="{{ im.name }}">
{% endthumbnail %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question