Change the "no image" Picture | Supply theme

DStanko
Pathfinder
160 0 4

I need to change the shopify no image photo to one of my own.

Replies 13 (13)

oscprofessional
Shopify Partner
15834 2369 3072

Hello 

Refer below URL this will help you.
https://community.shopify.com/c/Shopify-Design/Default-Image/td-p/91839

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
DStanko
Pathfinder
160 0 4

I don't get it. I dont know where to put the code. I uploaded the image and added it as an asset.

oscprofessional
Shopify Partner
15834 2369 3072

Okay 
Refer this link.
https://dozenpixels.com/blog/post/automatically-add-default-images-to-shopify-products

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
ashiqueh4
Shopify Partner
361 34 57

like that, 

 

{% if product.images.size == 0 %}

 

{{ 'default.png' | asset_url | img_tag }}

<img src="put here img cdn link"> 

{% else %} // show product image

 

{% endif %}

 

 

if you have image CDN than use 

<img src="put here img CDN link"> 

Shopify ,Shopify plus and Shopify 2.0 theme developer and customization

I Would like to add new functionality or customize an existing one, please hire me.
If helpful then please Like and Accept Solution .
Email: ashiquehussaincodediary@gmail.com

DStanko
Pathfinder
160 0 4

and where do i paste that?

AndyFine
Shopify Partner
3 0 3

Any response on this yet? Unclear where to place this code.

jarcustomsllc
Tourist
4 0 6

yeah where do we place the code?

gburner515
Shopify Partner
7 0 1

Hi - were you able to figure this out? If not can you let me know what theme you are using and I'll let you know where it needs to go.

jarcustomsllc
Tourist
4 0 6

I am using venture theme!

gburner515
Shopify Partner
7 0 1

Hey, in Venture you should have a folder in Sections -> product-template.liquid where the code can go. There should be an image <meta> tag right at the top of the file where you can add your if/else statement to check if there is a default image available. Let me know if you have further issues and I can take a deeper look.

 

Thanks,

Gary

Devonbrady
Visitor
1 0 0

What about for the theme "Maker" ? I'm finding it difficult to fix this issue on Maker.

LanceAllison
Shopify Partner
54 2 11

Hi, I know this thread was a while ago, but I am trying to do the same for Dawn theme. As this is now Shopify 2.0 is the solution different?

jondiego
New Member
9 0 0

If you guys are still trying to figure this out, look in your theme sections. I am using a OS2.0 theme and it's most likely 'product-info.liquid' or 'product-item.liquid'.

 

I was able to get it to work using the code below. Use the proper file name for your case. I used a file named "no-image.jpg"

 

Hope this helps someone.

{% if product.images.size == 0 %}

<a href="{{ product.url }}" class="product-item__image-wrapper">

<div class="aspect-ratio {% if settings.product_image_size != 'natural' %}aspect-ratio--{{ settings.product_image_size }}{% endif %}" style="padding-bottom: {{ 100.0 | divided_by: primary_media.preview_image.aspect_ratio }}%">
<img class="product-item__primary-image lazyload image--fade-in" data-media-id="{{ primary_media.id }}" data-src="{{ 'no-image.jpg' | asset_url }}" data-sizes="auto" data-widths="[{{ supported_sizes }}]" alt="{{ primary_media.alt | escape }}">

</div>
</a>
{% else %}

#you will need to add another {% endif %} where appropriate at the end.