Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Move all images to single directory
Marcin Gębalafe7a52f51c67
diff --git a/saleor/product/templatetags/product_images.py b/saleor/product/templatetags/product_images.pyindex bf6ac4dad5..915d4d91d9 100644--- a/saleor/product/templatetags/product_images.py+++ b/saleor/product/templatetags/product_images.py@@ -40,7 +40,7 @@ def get_thumbnail(instance, size, method='crop'):extra={'instance': instance, 'size': size})else:return thumbnail.url- return static('images/product-image-placeholder.png')+ return static('img/product-image-placeholder.png')@register.simple_tag()diff --git a/saleor/static/images/product-image-placeholder-small.png b/saleor/static/img/product-image-placeholder-small.pngsimilarity index 100%rename from saleor/static/images/product-image-placeholder-small.pngrename to saleor/static/img/product-image-placeholder-small.pngdiff --git a/saleor/static/images/product-image-placeholder.png b/saleor/static/img/product-image-placeholder.pngsimilarity index 100%rename from saleor/static/images/product-image-placeholder.pngrename to saleor/static/img/product-image-placeholder.pngdiff --git a/templates/cart/index.html b/templates/cart/index.htmlindex 5b989a99ce..eeb2ac1327 100644--- a/templates/cart/index.html+++ b/templates/cart/index.html@@ -44,7 +44,7 @@{% if line.variant.product.images.first %}<img class="cart-item-image" itemprop="image" src="{{ line.variant.product.images.first.image.crop.60x60 }}" alt="">{% else %}- <img class="cart-item-image" src="{% static 'images/product-image-placeholder-small.png' %}" alt="">+ <img class="cart-item-image" src="{% static 'img/product-image-placeholder-small.png' %}" alt="">{% endif %}<h3>{{ line.variant.product }}<br><small>{{ line.variant }}</small></h3>diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.htmlindex 0d204cbe4e..936a271461 100644--- a/templates/dashboard/product/list.html+++ b/templates/dashboard/product/list.html@@ -39,7 +39,7 @@{% if product.images.exists %}<img src="{{ product.images.first.image.crop.100x100 }}" alt="" class="circle teal">{% else %}- <img src="{% static 'images/product-image-placeholder-small.png' %}" alt="" class="circle teal">+ <img src="{% static 'img/product-image-placeholder-small.png' %}" alt="" class="circle teal">{% endif %}<a class="title" href="{% url 'dashboard:product-update' pk=product.pk %}"><span class="list-item-name">{{ product.name }}</span>diff --git a/templates/dashboard/product/modal_product_confirm_delete.html b/templates/dashboard/product/modal_product_confirm_delete.htmlindex d3e47dc879..a4f56eee5b 100644--- a/templates/dashboard/product/modal_product_confirm_delete.html+++ b/templates/dashboard/product/modal_product_confirm_delete.html@@ -16,7 +16,7 @@{% if product.images.exists %}<img src="{{ product.images.first.image.crop.400x400 }}" alt="" class="responsive-img">{% else %}- <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="responsive-img">+ <img src="{% static 'img/product-image-placeholder.png' %}" alt="" class="responsive-img">{% endif %}</div></div>diff --git a/templates/dashboard/product/product_confirm_delete.html b/templates/dashboard/product/product_confirm_delete.htmlindex 7f94d9fa1f..b9fe865410 100644--- a/templates/dashboard/product/product_confirm_delete.html+++ b/templates/dashboard/product/product_confirm_delete.html@@ -35,7 +35,7 @@{% if object.images.exists %}<img src="{{ product.images.first.image.crop.400x400 }}" alt="" class="responsive-img">{% else %}- <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="responsive-img">+ <img src="{% static 'img/product-image-placeholder.png' %}" alt="" class="responsive-img">{% endif %}</div>diff --git a/templates/product/details.html b/templates/product/details.htmlindex bef2f2b969..6188ec1421 100644--- a/templates/product/details.html+++ b/templates/product/details.html@@ -88,7 +88,7 @@{% endif %}</div>{% else %}- <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="img-fluid">+ <img src="{% static 'img/product-image-placeholder.png' %}" alt="" class="img-fluid">{% endif %}{% endwith %}</div>diff --git a/tests/test_product_tags.py b/tests/test_product_tags.pyindex f507321090..5e462ed50f 100644--- a/tests/test_product_tags.py+++ b/tests/test_product_tags.py@@ -16,7 +16,7 @@ def test_get_thumbnail():def test_get_thumbnail_no_instance():output = get_thumbnail(instance=None, size='10x10', method='crop')- assert output == '/static/images/product-image-placeholder.png'+ assert output == '/static/img/product-image-placeholder.png'def test_product_first_image():