-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
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
primaryImageandprimaryImageSmallfields.
Example of Affected Objects
The following objects were returned in a hasImages=true search but lack images:
- [Object 438003](https://collectionapi.metmuseum.org/public/collection/v1/objects/438003)
- [Object 500194](https://collectionapi.metmuseum.org/public/collection/v1/objects/500194)
- [Object 551098](https://collectionapi.metmuseum.org/public/collection/v1/objects/551098)
- [Object 486578](https://collectionapi.metmuseum.org/public/collection/v1/objects/486578)
- [Object 269436](https://collectionapi.metmuseum.org/public/collection/v1/objects/269436)
- [Object 591848](https://collectionapi.metmuseum.org/public/collection/v1/objects/591848)
- [Object 590976](https://collectionapi.metmuseum.org/public/collection/v1/objects/590976)
- [Object 591465](https://collectionapi.metmuseum.org/public/collection/v1/objects/591465)
- [Object 291956](https://collectionapi.metmuseum.org/public/collection/v1/objects/291956)
- [Object 207249](https://collectionapi.metmuseum.org/public/collection/v1/objects/207249)
(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=truefilter only includes objects with valid images inprimaryImageorprimaryImageSmall. - 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.
nsitu and O-J1