Hi there, hope you are having a good day.
I have to mention this because Dawn is one of the cornerstones of Shopify regarding theming right now (Dec 30th 2021), and this is no minor issue at all, as it could potentially provoke hours and hours of time wasted in unexperienced developers such as me.
I have installed Shopify CLI, this has been done by installing homebrew, git and rbenv.
At this point I’ve been able to see changes on real time as they are saved into the local repository’ files, even while they aren’t necessarily committed yet, by using the feature theme serve, and it has been great, however, there is another functionality of the CLI that made me lose at least 5 hours due to my inexperience.
That functionality is theme check, that can be used to detect errors and to force some coding guidelines into the theme you’re reviewing.
In this context theme check has displayed lots of occurrences of an allegedly deprecated filter, as it follows:
Deprecated filter
img_url, consider using image_url
The problem with using image_url instead of img_url in Dawn theme is that the path to the assets that are displayed is utterly destroyed, for example:
With img_url: https://cdn.shopify.com/s/files/1/0275/3783/4102/files/JFK_TWA_Corridor.jpg?v=1640840461
With image_url: /files/JFK_TWA_Corridor.jpg
I don’t know if I should call them a relative and an absolute path respectively, because one targets a media file hosted at a cdn level, but I’ll leave it that way.
Maybe it is just about a really cool and straightforward solution, a quick one, by modifying some parameter at the Dawn theme code and all of this should be fixed, but there are over 300 occurrences of this in around 30 different files, and I’m not too proficient in development, so that’s why I just restored the filter to its “flawed” state and now images work just fine.
Have you any experience like this one?
And if so, how have you fixed it?
Be well people!

