Skip to content

Commit

Permalink
Fall back to original image
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Feb 11, 2025
1 parent ce24d34 commit 311d3d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/29.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use the original image if the preview scale is not available. @davisagli
3 changes: 2 additions & 1 deletion src/components/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const View = (props) => {
<img
src={`${flattenToAppURL(data.image?.[0]?.['@id'])}/${
data.image?.[0]?.image_scales?.image[0]?.scales?.preview
?.download
?.download ||
data.image?.[0]?.image_scales?.image[0]?.download
}}`}
alt={data.image?.[0]?.title}
className="image"
Expand Down

0 comments on commit 311d3d3

Please sign in to comment.