Development discussions around Shopify APIs
Is there a way to get all the images of a shop at once? I think it would be possible with graphql bulk query.
Hi, I unfortunately can't help you get everything with one solution, if the solution exists it's a bit beyond my knowledge area, but in case it's helpful I wanted to put this idea in front of you for the products piece:
You could use liquid forloop to get all the images of all products by creating a new "All Products" collection using a condition like product price greater than -1 ought to do it, then create a new collection template like "collection.all-product-images.liquid" with the below code, then set the new All Product collection to that all-product-images template. Whenever you view that collection, it will be a paginated list of all the store's product images.
{%- layout none -%} {%- paginate collection.products by 1000 -%} <p>{%- if paginate.current_page == 1 -%}{%- else -%}<a href="{{ paginate.previous.url }}">Previous</a> - {%- endif -%}{{ paginate.current_page }} / {{ paginate.pages }} - <a href="{{ paginate.next.url }}">Next</a></p> {%- for product in collection.products -%} {%- for image in product.images -%} <div>{{ image | product_img_url: 'large'}}</div> {%- endfor -%} {%- endfor -%} {%- endpaginate -%}
As for getting all files, this post by @Jason might be helpful:
https://freakdesign.com.au/blogs/news/113610119-export-a-list-of-all-files-in-the-shopify-admin
Hope that helps any
Hello! Thanks for the reply. But I want to store all the image files originalSrc url to my database when the shop installs my app. I won't be able to do that using this.
User | RANK |
---|---|
8 | |
7 | |
3 | |
3 | |
3 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By