We encountered an issue with the hasImages=true query parameter when fetching objects from the Met Museum API. According to the documentation, this parameter should return only objects that have images. However, our query returned multiple objects without images (primaryImage and primaryImageSmall are empty).
Steps to Reproduce
- Perform a search with
hasImages=true, for example:
https://collectionapi.metmuseum.org/public/collection/v1/search?q=a&hasImages=true
- Fetch details of the objects returned by the search.
- Some objects have empty
primaryImage and primaryImageSmall fields.
Example of Affected Objects
The following objects were returned in a hasImages=true search but lack images:
(There are more cases, but these are just 10 examples)
Expected Behavior
When querying with hasImages=true, only objects with valid images should be included in the search results.
Actual Behavior
The query returns objects with no images, even though hasImages=true is specified.
Suggested Fix
- Ensure the
hasImages=true filter only includes objects with valid images in primaryImage or primaryImageSmall.
- Double-check database records to confirm why these objects are included.
Environment
- API Version: Public Met API
- Query Used:
q=a&hasImages=true
- Browser/Platform: Any browser or API client
Additional Notes
This issue affects UI and user experience, as we have to filter out invalid objects manually.
We encountered an issue with the
hasImages=truequery parameter when fetching objects from the Met Museum API. According to the documentation, this parameter should return only objects that have images. However, our query returned multiple objects without images (primaryImageandprimaryImageSmallare empty).Steps to Reproduce
hasImages=true, for example:primaryImageandprimaryImageSmallfields.Example of Affected Objects
The following objects were returned in a
hasImages=truesearch but lack images:(There are more cases, but these are just 10 examples)
Expected Behavior
When querying with
hasImages=true, only objects with valid images should be included in the search results.Actual Behavior
The query returns objects with no images, even though
hasImages=trueis specified.Suggested Fix
hasImages=truefilter only includes objects with valid images inprimaryImageorprimaryImageSmall.Environment
q=a&hasImages=trueAdditional Notes
This issue affects UI and user experience, as we have to filter out invalid objects manually.