fix: use proper SVG placeholder image across all shop templates

Issues fixed:
- placeholder.jpg contained SVG content but browsers won't render SVG in .jpg files
- Multiple templates referenced wrong placeholder paths

Changes:
- Rename placeholder.jpg to placeholder.svg with proper SVG file
- Update product.html to use /static/shop/img/placeholder.svg
- Update products.html to use /static/shop/img/placeholder.svg
- Update cart.html to use /static/shop/img/placeholder.svg (was /static/images/)

All shop pages now correctly display placeholder images when products
have no image_link set.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-23 06:30:23 +01:00
parent e94b3f9dca
commit 6fa9ccb552
4 changed files with 4 additions and 4 deletions

View File

@@ -45,7 +45,7 @@
<template x-for="item in items" :key="item.product_id">
<div class="cart-item-card">
<div class="item-image">
<img :src="item.image_url || '/static/images/placeholder.png'"
<img :src="item.image_url || '/static/shop/img/placeholder.svg'"
:alt="item.name">
</div>

View File

@@ -29,7 +29,7 @@
<div class="product-images">
<div class="main-image bg-white dark:bg-gray-800 rounded-lg overflow-hidden mb-4">
<img
:src="selectedImage || '/static/shop/img/placeholder.jpg'"
:src="selectedImage || '/static/shop/img/placeholder.svg'"
:alt="product?.marketplace_product?.title"
class="w-full h-auto object-contain"
style="max-height: 600px;"
@@ -186,7 +186,7 @@
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-shadow overflow-hidden cursor-pointer">
<a :href="`{{ base_url }}shop/products/${related.id}`">
<img
:src="related.marketplace_product?.image_link || '/static/shop/img/placeholder.jpg'"
:src="related.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
:alt="related.marketplace_product?.title"
class="w-full h-48 object-cover"
>

View File

@@ -74,7 +74,7 @@
<template x-for="product in products" :key="product.id">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-shadow overflow-hidden">
<a :href="`{{ base_url }}shop/products/${product.id}`">
<img :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.jpg'"
<img :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
:alt="product.marketplace_product?.title"
class="w-full h-48 object-cover">
</a>

View File

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 291 B