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

Add API endpoint for images #589

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Add API endpoint for images #589

wants to merge 3 commits into from

Conversation

JVT038
Copy link
Collaborator

@JVT038 JVT038 commented Feb 25, 2024

I have added two API endpoints:

  • /api/images/movies/{id}
  • /api/images/person/{id}

They return a 404 if the ID doesn't exist or if the item doesn't have an image. If the image does exist, then it returns 200 with the raw image data attached in the body.

Part of #572

@JVT038 JVT038 requested a review from leepeuker as a code owner February 25, 2024 20:02
@JVT038 JVT038 mentioned this pull request Feb 25, 2024
74 tasks
@JVT038
Copy link
Collaborator Author

JVT038 commented Feb 28, 2024

@leepeuker What do you think about using something like imagejpeg or ImageMagick to compress the returned images?

@JVT038
Copy link
Collaborator Author

JVT038 commented Dec 1, 2024

So I merged main into this branch, and this got me thinking: Do we even need this?

Can't we just load the images from TMDB themselves instead of doing it like this?

Or maybe we can use this API endpoint to act as a 'proxy'. Then the client will send an HTTP GET request for an image and this endpoint will either return the image from its own cache or proxy the request to the TMDB servers if the image isn't cached. Although for this functionality, the PR will have to be overhauled.

I'm marking this as draft, because I'm not sure if this PR is necessary.

@JVT038 JVT038 marked this pull request as draft December 1, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant