Resource Picker only loads first 5 product images, skips the rest

Solved
JoesIdeas
Shopify Expert
1188 104 285

Hello, I'm using the app bridge ResourcePicker and it works great, except it only retrieves the first 5 images, ignoring the rest.

Steps to duplicate:
1) Select a product in the Resource Picker, a product with 6+ images.

2) Log the selected product object to console.

3) See that the images array only as the first 5 images.

 

How can you set it to retrieve all product images?

Thanks

Founder of Speed Boostr (Shopify optimization experts, theme customization, custom app development).
Creator of Shopify Analyzer (first performance analysis tool for Shopify sites, free for the Shopify community).
Creator of Order Automator (auto tag orders and customers + auto fulfill orders + email notifications).
Creator of Theme Scientist (A/B testing app) and Tip Jar (add a tip button to your store).
0 Likes
iain-campbell
Shopify Staff
Shopify Staff
54 9 20

This is an accepted solution.

Hi Joe,

There isn’t a way to customize the query that the ResourcePicker makes. You can use the Admin API to fetch the additional information you need from the Product resource.

Since the Product resource can be very large, especially with a large number of variants, we are actually considering going the opposite direction with the App Bridge ResourcePicker API: allowing the picker to (optionally) return less information, and expecting the app to query the Admin API for the information it needs. Ideally, the app would use GraphQL to return only the fields it needs. While this adds an additional API call, we expect it will be significantly more efficient for some use cases.

iain-campbell | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog