Cover image not displayed in search results
Problem
A cover image that's displayed just fine when viewed from the book page isn't shown in the search results: https://openlibrary.org/search?q=Goa+Stott&mode=everything&sort=old&first_publish_year=2011
Thank you for looking into this.
Reproducing the bug
-
Go to https://openlibrary.org/search?q=Goa+Stott&mode=everything&sort=old&first_publish_year=2011 The book in the search results has no cover image displayed.
-
Click on the book's title so you open the page for that book in the search results: https://openlibrary.org/works/OL17468223W/Goa
- Expected behavior: A book's cover image can be viewed from both the search results and that book's page.
- Actual behavior: This book's cover image can only be viewed from the book page. This book's cover image is not displayed in the search results.
Context
- Browser (Chrome, Safari, Firefox, etc): Opera for Android
- OS (Windows, Mac, etc): Android
- Logged in (Y/N):Y
- Environment (prod, dev, local): prod
Breakdown
Requirements Checklist
- [ ]
Related files
Stakeholders
Instructions for Contributors
- Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
I can't reproduce the bug.
@FizaSiddique123 Please note there's no cover image displayed in this (https://openlibrary.org/search?q=Team+Suzuki+Ray+Battersby&mode=everything) search result listing for a book with multiple editions.
As @395ShikharSingh points out, this renders fine on the desktop web, so it's likely a mobile-specific bug.
Thanks for the feedback! I see the issue on the Team Suzuki search page. I will investigate the mobile layout to check if the cover container is hidden or collapsing due to CSS (e.g., flex/grid rules on small screens). I will update the PR with a mobile-friendly fix.
Thanks for the review — good catch. I pushed a small mobile-specific CSS fix that forces the cover box to display and reserves ~80px so the title/metadata don't collapse the cover out of view on small screens. This change is in the same branch.
If you'd prefer a different approach (grid vs flex) or a different width, I'm happy to adjust.
@FizaSiddique123 Please also take a look at this bug #10953 , where cover images (as well as titles and author names) don't load in when editing a large list on mobile.