Image Assets - Image showing as broken in template

Topic summary

A user is experiencing a broken image link in their Shopify template after uploading an image to the assets section. The image file is named ‘ebay-logo’ but the template code references ‘{CDNURL}/ebay/logo.png’.

Initial diagnosis identified two issues:

  • Filename mismatch between the uploaded asset and template code
  • Duplicate style= attribute in the HTML image tag

Attempted solutions that didn’t resolve the problem:

  • Updating the code to match the asset filename ({CDNURL}/ebay-logo)
  • Uploading images to Shopify’s Content > Files section instead

Additional complications discovered:

  • HTML validation error showing an improperly closed </div> tag
  • Suggestion that multiple coding errors may exist throughout the template

Current status: The issue remains unresolved. The user acknowledges limited coding expertise and indicates they may need to hire a developer to properly code the entire template, as their previous developer wasn’t specialized in this area.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I seem to be having an issue with an image that I added to the asset section which is not showing (broken link by the looks of it) when I update my template.

I uploaded the image to the asset (not files though).

Am I missing something in the CDNURL?

The image name is asset is ebay-logo

Any help with this would really be appreciated.

Hey @Boywonder ,

I’ve identified the issue with the eBay logo not displaying in your Shopify template. There are two problems causing the broken image link:

Issues Found:

  1. Filename mismatch: Your uploaded asset is named ebay-logo but your template code is looking for ebay/logo.png
  2. HTML syntax error: There’s a duplicate style= attribute in your image tag

Quick Fix (Recommended): Update your template code to match your uploaded asset name:

<!-- Logo & Top Links -->
<div style="display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; padding:15px;">
    <div style="flex:1; min-width:500px; text-align:center;">
        <img src="{CDNURL}/ebay-logo" style="max-width:300px; width:100%; height:auto;">
    </div>
</div>

What Changed:

  • Changed {CDNURL}/ebay/logo.png to {CDNURL}/ebay-logo
  • Fixed the duplicate style attribute
  • Kept all your existing styling

Testing: After making this change, save your template and refresh your store to see the logo display properly.

Let me know if you need any help implementing this fix or if you run into any other issues!

Best regards,

Shubham | Untechnickle

Hi @TheUntechnickle

Thank you so much for your reply although this did not work for me unfortunately.

When I saved it I did as you said then checked it but again no image shown so I went back into the template and at the bottom of the file was this.

The last had a red line underneath with this message (Attempting to close HtmlElement ‘div’ before it was opened).

Would that be anything to do with it?

Can you share the full file please? It’d be better if you can email us at the ID below, we’ll fix it and send the whole file back that you can simply copy paste.

Looking forward to hearing from you,
Shubham | Untechnickle

1 Like

Ensure your URL, “{CDNURL}/ebay/logo.png”, is published to view. I recommend you upload images to your Shopify store admin > Content > Files and get the link from here.

Hi @johnjohn2

Thank you for your reply.

I did try this but it did not work for me unfortunately.

I am no developer and I think there maybe other errors in the whole document which might be stopping the images from displaying so looks like I am going to have to try and find someone who can code the whole template for me.

I had the template done by someone else but only found out afterwards that it wasn’t their specialised subject.

We live and learn.

Thank you for your time though it is much appreciated.