We have a live site and a dev site with a copy of all the files from the live site.
Both sites have banner options set up in metafields. I’ve set up some additional metafields so the client can set date and time and add new banners that are scheduled to show and end at set times.
I have it working, but for some reason there are differences.
On the dev site I had to use img_url, which also gave me the option to set sizes and crop:
{% assign start = collection.metafields.my_fields.banner_schedule_start | date: '%s' %}
{% assign end = collection.metafields.my_fields.banner_schedule_end | date: '%s' %}
{% assign now = "now" | date: '%s' %}
{% assign bannerdesktop_schedule = collection.metafields.my_fields.banner_image_to_schedule %}
{% assign bannermobile_schedule = collection.metafields.my_fields.mobile_banner_schedule %}
{% assign bannerdesktop = collection.metafields.collection.banner %}
{% assign bannermobile = collection.metafields.collection.mobile_banner %}
{% if now > start and now < end and bannerdesktop_schedule != blank %}
{% else %}
{% endif %}
this output as expected:
But on the live site, img_url doesn’t work, I had to use image_url and the set sizes and crop don’t work:
{% assign start = collection.metafields.collections.banner_schedule_start | date: '%s' %}
{% assign end = collection.metafields.collections.banner_schedule_end | date: '%s' %}
{% assign now = "now" | date: '%s' %}
{% assign bannerdesktop_schedule = collection.metafields.collections.desktop_banner_schedule %}
{% assign bannermobile_schedule = collection.metafields.collections.mobile_banner_schedule %}
{% assign bannerdesktop = collection.metafields.collection.banner %}
{% assign bannermobile = collection.metafields.collection.mobile_banner %}
{% if now > start and now < end and bannerdesktop_schedule != blank %}
{% else %}
{% endif %}
output shows as:

Anyone got any ideas on why this issue shows/doesn’t work?
Also how can I get the alt tag from the images/files?