Images not appearing using resizeOnDemand plugin

Iā€™m would like to use the resizeOnDemand plugin along with the Kirby Images plugin but the images are are not appearing. I have attached a picture of the output. How do I go about troubleshooting this?

<?php
    $pieces = page('work')->children()->visible();
?>

<?php foreach($piece->thumbnails()->yaml() as $image): ?>   
   <?php if($image = $piece->image($image)): ?>
         <a href="<?= $image->url(); ?>" data-fancybox="gallery" data-slug="<?php echo str::slug($piece->title())?>" data-caption="<?= $piece->title()->html(); ?>">
             <?php 
              $srcset = '';
              for ($i = 100; $i <= 3000; $i += 100) $srcset .= resizeOnDemand($image, $i) . ' ' . $i . 'w,';
             ?> 
             <img 
              src="<?php echo resizeOnDemand($image, 500) ?>" 
              srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" 
              data-srcset="<?php echo $srcset ?>" 
              data-sizes="auto" 
              data-optimumx="1.5" 
              alt="<?= $piece->title()->html(); ?>" 
              class="lazyload">
        </a>
   <?php endif ?>
<?php endforeach; ?>

Have you tested this with a single image outside of your slider context? Do you get any errors in your console?