Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
fix: fix placeholder images (#3838)
Oleg Isonena344af4d565c
diff --git a/apps/builder/app/builder/features/project-settings/section-marketplace.tsx b/apps/builder/app/builder/features/project-settings/section-marketplace.tsxindex 4f8b5411ed..bf36835c64 100644--- a/apps/builder/app/builder/features/project-settings/section-marketplace.tsx+++ b/apps/builder/app/builder/features/project-settings/section-marketplace.tsx@@ -14,7 +14,6 @@ import {InputErrorsTooltip,PanelBanner,Select,- rawTheme,Box,} from "@webstudio-is/design-system";import { ImageControl } from "./image-control";@@ -38,10 +37,18 @@ import { rightPanelWidth, sectionSpacing } from "./utils";const thumbnailStyle = css({borderRadius: theme.borderRadius[4],- borderWidth: 1,- borderStyle: "solid",- borderColor: theme.colors.borderMain,+ outlineWidth: 1,+ outlineStyle: "solid",+ outlineColor: theme.colors.borderMain,+ width: theme.spacing[28],aspectRatio: "1.91",+ background: "#DFE3E6",+});++const thumbnailImageStyle = css({+ display: "block",+ width: "100%",+ height: "100%",variants: {hasAsset: {true: {@@ -208,12 +215,15 @@ export const SectionMarketplace = () => {<Label>Thumbnail</Label><Grid flow="column" gap={3}><InputErrorsTooltip errors={errors?.thumbnailAssetId}>- <Image- width={rawTheme.spacing[28]}- className={thumbnailStyle({ hasAsset: asset !== undefined })}- src={asset ? `${asset.name}` : undefined}- loader={imageLoader}- />+ <Box className={thumbnailStyle()}>+ <Image+ className={thumbnailImageStyle({+ hasAsset: asset !== undefined,+ })}+ src={asset ? `${asset.name}` : undefined}+ loader={imageLoader}+ />+ </Box></InputErrorsTooltip><Grid gap={2}>diff --git a/apps/builder/app/builder/features/sidebar-left/panels/pages/social-preview.tsx b/apps/builder/app/builder/features/sidebar-left/panels/pages/social-preview.tsxindex c8ee932b46..08902b5f8e 100644--- a/apps/builder/app/builder/features/sidebar-left/panels/pages/social-preview.tsx+++ b/apps/builder/app/builder/features/sidebar-left/panels/pages/social-preview.tsx@@ -15,7 +15,7 @@ const imgStyle = css({borderTopLeftRadius: theme.borderRadius[4],borderTopRightRadius: theme.borderRadius[4],width: "100%",- aspectRatio: "1.91 / 1",+ aspectRatio: "1.91",background: "#DFE3E6",borderBottom: `1px solid ${theme.colors.borderMain}`,variants: {@@ -51,7 +51,8 @@ export const SocialPreview = ({src={ogImageUrl}loader={imageLoader}className={imgStyle({- hasImage: ogImageUrl !== undefined ? true : undefined,+ hasImage:+ ogImageUrl === undefined || ogImageUrl === "" ? false : true,})}/>diff --git a/packages/image/src/image.tsx b/packages/image/src/image.tsxindex 26b942ef6c..3d62f407b3 100644--- a/packages/image/src/image.tsx+++ b/packages/image/src/image.tsx@@ -53,7 +53,7 @@ const imagePlaceholderSvg = `data:image/svg+xml;base64,${btoa(`<svgfill="none"xmlns="http://www.w3.org/2000/svg">- <rect width="600" height="600" fill="hsla(0, 0%, 80%, 0.2)" />+ <rect width="600" height="600" fill="#DFE3E6" /><pathfill-rule="evenodd"clip-rule="evenodd"