Skip to content

Commit

Permalink
fix(seo): dynamic share image path + format
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelodelain committed May 21, 2024
1 parent aec55c2 commit 4c09478
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions plugins/01.init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,17 @@ function initSeoMeta(webResponse?: RoadizWebResponse) {
commonContent.value?.head?.shareImage?.relativePath

if (image) {
return img(image, {
width: 1200,
quality: 70,
})
return img(
image,
{
width: 1200,
crop: '1200x630',
quality: 70,
},
{
provider: 'interventionRequest',
},
)
} else {
return joinURL(runtimeConfig.public.site.url, '/images/share.jpg')
}
Expand Down

0 comments on commit 4c09478

Please sign in to comment.