ArticleGrid default image size changed

This commit is contained in:
tmshv committed 2020-02-27 21:10:54 +03:00
1 parent 0a470e2441
commit d5390fa99a
1 file changed
+4 -2
+4 -2
View File
@@ -15,14 +15,16 @@ export function resizeImage(src: string, options: IResizeImage): string {
return `https://images.weserv.nl/?url=${src}&w=${options.w}&h=${options.h}&n=-1`
}
const cardImgSize1 = { w: 500, h: 500 }
const cardImgSize2 = { w: 1000, h: 1000 }
function getImage(image?: ImageDefinition) {
if (!image) {
const defaultSrc = process.env.APP_CARD_DEFAULT_IMAGE
const src = resizeImage(defaultSrc, { w: 400, h: 400 })
const src = resizeImage(defaultSrc, cardImgSize1)
const set = [
{
density: 2,
href: resizeImage(defaultSrc, { w: 800, h: 800 }),
href: resizeImage(defaultSrc, cardImgSize2),
}
]
const srcSet = set