Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying image width and/or height for OPDS 2.0? #54

Open
mikespub opened this issue Dec 14, 2024 · 0 comments
Open

Specifying image width and/or height for OPDS 2.0? #54

mikespub opened this issue Dec 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mikespub
Copy link
Contributor

What happened?

In OPDS 2.0 images MAY include any number of image format, resolution or aspect ratio - see https://drafts.opds.io/opds-2.0#23-images

The current php-opds implementation uses hard-coded values for width and height:

['href' => $entry->getMediaThumbnail() ?? '', 'type' => 'image/jpeg', 'height' => 700, 'width' => 400],

We should either support getting the image size in that method, and/or allow some way to pass along that information in OpdsEntryNavigation and OpdsEntryBook - right now the constructor uses ?string

protected ?string $mediaThumbnail = null,

How to reproduce the bug

Generate OPDS 2.0 feed

Package Version

2.1.0

PHP Version

8.2

Which operating systems does with happen with?

Linux

Notes

Nothing urgent, but I noticed that on Android the Readium demo app didn't like showing images on a small device with OPDS 2.0. I'm not sure if the width/height is the issue or something else...

@mikespub mikespub added the bug Something isn't working label Dec 14, 2024
@ewilan-riviere ewilan-riviere self-assigned this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants