Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Allow to easy override default thubmnail generation behavior

Artur Smęt43a8f6b2656c
diff --git a/saleor/settings.py b/saleor/settings.py
index cea7991910..112425cf7d 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -297,6 +297,12 @@ VERSATILEIMAGEFIELD_RENDITION_KEY_SETS = {
('product_page_big', 'crop__750x750'),
('product_page_thumb', 'crop__280x280')]}
+VERSATILEIMAGEFIELD_SETTINGS = {
+ # Images should be pre-generated on Production environment
+ 'create_images_on_demand': ast.literal_eval(
+ os.environ.get('CREATE_IMAGES_ON_DEMAND', 'True')),
+}
+
WEBPACK_LOADER = {
'DEFAULT': {
'CACHE': not DEBUG,