diff --git a/templates/img.hbs b/templates/img.hbs
index 8b88ed6..497b6e5 100644
--- a/templates/img.hbs
+++ b/templates/img.hbs
@@ -1,7 +1,7 @@
-
+{{#if sizes}}
 <div class="{{className}}" {{#if style}}style="{{style}}"{{/if}} target="_break">
   <a href="{{#if link}}{{link}}{{else}}{{rev (lookup (last sizes) 'url')}}{{/if}}" class="lb"><img
-    src="{{rev sizes.0.url}}"
+    src="{{rev url}}"
     alt="{{alt}}"
     srcset="{{#join sizes}}{{rev url}} {{width}}w{{/join}}"
     sizes="{{#if srcSizes}}{{srcSizes}}{{else}}(max-width: 576px) 100vw, 576px{{/if}}"
@@ -11,3 +11,4 @@
 
   {{#if caption}}<span class="card-body">{{{caption}}}</span>{{/if}}
 </div>
+{{/if}}