Skip to content

Commit

Permalink
Added product slug to image url
Browse files Browse the repository at this point in the history
  • Loading branch information
armans-code committed Oct 22, 2024
1 parent 4776160 commit 5dd7a88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const nextConfig = {
hostname: "bevgyjm5apuichhj.public.blob.vercel-storage.com",
port: "",
pathname: "/**",
search: "",
// search: "",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export default async function Page(props: {
<Image
loading="eager"
decoding="sync"
src={productData.image_url ?? "/placeholder.svg?height=64&width=64"}
src={
productData.image_url
? productData.image_url + `?product=${productData.slug}`
: "/placeholder.svg?height=64&width=64"
}
alt={`A small picture of ${productData.name}`}
height={256}
quality={80}
Expand Down

0 comments on commit 5dd7a88

Please sign in to comment.