-
Notifications
You must be signed in to change notification settings - Fork 50
Use thumbnail as image url image_view if available #1060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sahil-R! The logic is sound but the code quality can be improved in some ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment can use some punctuation and grammar improvements but other than that, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the contribution and quick changes @sahil-R.
I approved, but prematurely. If you can please add unit tests for this change, then it will be able to be approved and merged without issue. The new tests would need to be added in |
Based on the medium urgency of this PR, the following reviewers are being gently reminded to review this PR: @obulat Excluding weekend1 days, this PR was updated 4 day(s) ago. PRs labelled with medium urgency are expected to be reviewed within 4 weekday(s)2. @sahil-R, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings. Footnotes |
Ups, I made the test based on the old ones, before noticing the conflict. I'll get back to this later if @sahil-R doesn't get to it firsts. |
Fixes
Fixes WordPress/openverse#675 by @stacimc
Description
Some providers can link large images in their image_url, This can cause unacceptably slow response times or even timeouts when generating thumbnails via our thumbnail service.
This pr tries to tackle this by checking if there is a thumbnail URL available or not, if yes, then it uses the thumbnail URL; if not, only then it uses the image URL.
Testing Instructions
Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin