openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Cover image not displayed in search results

Open el4ctr0n opened this issue 3 weeks ago • 6 comments

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

Image Image

Thank you for looking into this.

Reproducing the bug

  1. 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.

  2. 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.

el4ctr0n avatar Dec 07 '25 20:12 el4ctr0n

I can't reproduce the bug.

Image

395ShikharSingh avatar Dec 08 '25 01:12 395ShikharSingh

@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.

Image Image

el4ctr0n avatar Dec 08 '25 19:12 el4ctr0n

As @395ShikharSingh points out, this renders fine on the desktop web, so it's likely a mobile-specific bug.

tfmorris avatar Dec 08 '25 21:12 tfmorris

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.

FizaSiddique123 avatar Dec 09 '25 09:12 FizaSiddique123

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 avatar Dec 09 '25 09:12 FizaSiddique123

@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.

el4ctr0n avatar Dec 10 '25 01:12 el4ctr0n