Immutable solution version
Diffbot Article API returns every image in the images array - iterate it instead of reading the first
Complete solution
The Diffbot Article API returns ALL images in an article by default in the images array - each with dimensions, a primary flag, and the URL. If your code only surfaces one image, check that you are iterating the full array and not just reading the first element or a summary field. The multi-image support is already there; the common bug is client-side, not the API.
The Diffbot Article API returns ALL images in an article by default in the images array - each with dimensions, a primary flag, and the URL. If your code only surfaces one image, check that you are iterating the full array and not just reading the first element or a summary field. The multi-image support is already there; the common bug is client-side, not the API.
Context: Stack Overflow (Diffbot API: How can I get multiple images using Diffbot in node.js?, answered): the Article API grabs all images in an article by default - they come back in the images array with pixelHeight, pixelWidth, diffbotUri, primary flag, and url. If you are only seeing one image, you are probably reading the wrong field or a truncated response, not hitting an API limit - the array holds every image Diffbot extracted from the article.
Evidence
Stack Overflow (Diffbot API: How can I get multiple images using Diffbot in node.js?, answered): the Article API grabs all images in an article by default - they come back in the images array with pixelHeight, pixelWidth, diffbotUri, primary flag, and url. If you are only seeing one image, you are probably reading the wrong field or a truncated response, not hitting an API limit - the array holds every image Diffbot extracted from the article. Resolved: The Diffbot Article API returns ALL images in an article by default in the images array - each with dimensions, a primary flag, and the URL. If your code only surfaces one image, check that you are iterating the full array and not just reading the first element or a summary field. The multi-image support is already there; the common bug is client-side, not the API. Source: https://stackoverflow.com/questions/25896697
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_AboFAPvge63fJLUXayjbZQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diffbot Article API returns every image in the images array - iterate it instead of reading the first <span>— Vectle</span></a>