Skip to content

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.

make it bg image

Sara Vieira169378816f7a
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx
index d299c56513..6966b1b5b2 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx
@@ -1,7 +1,6 @@
import { Asset } from "@webstudio-is/prisma-client";
import { useEffect, useMemo, useState } from "react";
import { Box } from "~/shared/design-system";
-import { Image as Thumbnail } from "~/shared/design-system/components/image";
import placholderImage from "~/assets/images/image_place_holder.svg";
import brokenImage from "~/assets/images/broken_image_place_holder.svg";
@@ -31,16 +30,14 @@ const useImageWithFallbaack = ({ path }: { path: string }) => {
export const AssetManagerImage = ({ asset: { path } }: { asset: Asset }) => {
const { imageSrc } = useImageWithFallbaack({ path });
return (
- <Box css={{ paddingTop: "100%", position: "relative", aspectRatio: "1/1" }}>
- <Thumbnail
- css={{
- position: "absolute",
- top: "50%",
- transform: "translateY(-50%) translateX(-50%)",
- left: "50%",
- }}
- src={imageSrc}
- ></Thumbnail>
- </Box>
+ <Box
+ css={{
+ aspectRatio: "1/1",
+ width: "100%",
+ height: "100%",
+ backgroundImage: `url(${imageSrc})`,
+ backgroundSize: "contain",
+ }}
+ ></Box>
);
};
diff --git a/apps/designer/app/shared/icons/image-broken.tsx b/apps/designer/app/shared/icons/image-broken.tsx
deleted file mode 100644
index 1ec2b671f2..0000000000
--- a/apps/designer/app/shared/icons/image-broken.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as React from "react";
-import { IconProps } from "./types";
-
-export const ImageBrokenIcon = React.forwardRef<SVGSVGElement, IconProps>(
- ({ color = "currentColor", ...props }, forwardedRef) => {
- return (
- <svg
- role="img"
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 128.2 120.2"
-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.1c-1.1 0-2 .9-2 2v9.2h-8L63.9 45c-.8-.6-1.9-.6-2.6.1L46.1 59.6l-6.6-3.8c-.7-.4-1.6-.4-2.2.1l-9.7 7.3c-.5.4-.8 1-.8 1.6V74c0 .5.2 1 .6 1.4.4.4.9.6 1.4.6h15.5v6.4z"
- fill={color}
- />
- <path
- d="M37.3 47.4c5 0 9-4.1 9-9 0-5-4.1-9-9-9-5 0-9 4.1-9 9-.1 4.9 4 9 9 9zm0-14.1c2.8 0 5 2.3 5 5 0 2.8-2.3 5-5 5-2.8 0-5-2.3-5-5-.1-2.8 2.2-5 5-5z"
- fill={color}
- />
- </svg>
- );
- }
-);
-
-ImageBrokenIcon.displayName = "ImageBrokenIcon";
diff --git a/apps/designer/app/shared/icons/index.ts b/apps/designer/app/shared/icons/index.ts
index 3275677e47..09c273be06 100644
--- a/apps/designer/app/shared/icons/index.ts
+++ b/apps/designer/app/shared/icons/index.ts
@@ -9,4 +9,3 @@ export * from "./github";
export * from "./devices";
export * from "./tablet";
export * from "./types";
-export * from "./image-broken";