Custom "No Image" image?

Highlighted
New Member
1 0 0

I am interested in how to change the default "no image" image for a custom one, like my logo. I am using it particularly for additional variant sizes (for photographic prints). Obviously I don't want to add the same product image over and over just to make it pop up in this:

{% assign index = 0 %}

{% for variant in item.product.variants %}

{% if variant.title == item.variant.title %}

{% assign index = forloop.index0 %}

{% endif %}

{% endfor %}

<a href="{{ item.product.url }}" title="{{ item.title | escape }}"> <img src="{{ item.product.images[index] | product_img_url: 'thumb' }}"

alt="{{ item.variant.title | escape }}" /> </a>

I have scoured for this, and spent hours on it, and it has been mentioned before here. I am set to launch on 3/1 and this driving me mad!

Hopefully someone has figured this out since 2007!

Thanks so much in advance,

Carolyn

www.jackrabbitmarketplace.com

password: ciayau

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
5711 0 150

You may be able to scrape something together from this thread:

http://forums.shopify.com/categories/2/posts/38111

If you do please post back for others! :D

http://shopifyplus.com ::: http://twitter.com/bacchus
0 Likes
Highlighted
Shopify Partner
3 0 0

I uploaded a default image as an asset, and am using:

<img src="{% if product.featured_image.size > 0 %}{{ product.featured_image | product_img_url: 'medium' }}{% else %}{{ 'no-image.png' | asset_url }}{% endif %}" alt="{{ product.title | escape }}" />

 

0 Likes