Skip to content

Commit

Permalink
Specify collection image aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
gregzaal committed Oct 8, 2024
1 parent f00e098 commit d570067
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/Library/CatBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const CatBanner = ({ assetType, collections }) => {
{assetType === 'all'
? Object.keys(collections).map((collectionID, i) => (
<Link key={i} href={`/collections/${collectionID}`} className={`${styles.cat}`}>
<img src={`https://cdn.polyhaven.com/collections/${collectionID}.png?width=578`} />
<img src={`https://cdn.polyhaven.com/collections/${collectionID}.png?width=578&aspect_ratio=16:9`} />
<p>{collections[collectionID]}</p>
</Link>
))
Expand Down
5 changes: 4 additions & 1 deletion components/Library/Collections/Collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const Collection = ({ collectionId, data }) => {
<div className={styles.collection}>
<div className={styles.collectionInner}>
<Link href={collectionLink}>
<img src={`https://cdn.polyhaven.com/collections/${collectionId}.png?width=578`} alt={`${data.name}`} />
<img
src={`https://cdn.polyhaven.com/collections/${collectionId}.png?width=578&aspect_ratio=16:9`}
alt={`${data.name}`}
/>
</Link>
{data.community && (
<div className={styles.banner}>
Expand Down

0 comments on commit d570067

Please sign in to comment.