-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
img_url / image_url inconsistency with broken image urls #1697
Comments
I ran into this issue when developing a new section. The workaround would be to first check if the image exists, and then loading it like this:
But this is unnecessary ugly, new stuff shouldn't be less good than deprecated. |
I come across the issue today. Can it give a better output instead of the liquid error? I am following this example {{ product | image_url: width: 450 }} I've tried the default filter but it doesn't work. This is ok: |
I'm experiencing the same issue when using Correct output: Incorrect output: |
How do you disable theme check, I'm trying to disable it for my project or find a way to update the default setting if there is an option. I plan to update the tab size for schema JSON; the default is 2, but I'm a 4-space developer. Thanks. By the way, I'm experiencing the same image_url issue where it returns Edit |
Bump |
A product without an image using the img_url filter:
{{ product | img_url }}
Outputs a valid image URL:
//cdn.shopify.com/shopifycloud/shopify/assets/no-image-100-c91dd4bdb56513f2cbf4fc15436ca35e9d4ecd014546c8d421b1aece861dfecf_small.gif
A product without an image using the image_url filter:
{{ product | image_url }}
Outputs the follow error:
[Liquid error (snippets/image line 8): invalid url input](http://127.0.0.1:9292/products/test) [test](http://127.0.0.1:9292/products/test)
Nobody wants to see an error with a line reference to the store's source code on a production store due to a bad image link. I can't think of any scenario where this behaviour would be preferable.
This also breaks any proceeding image_tag filter.
Is this a bug?
The text was updated successfully, but these errors were encountered: