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.

remoive width and height css

Sara Vieira816ed74b105a
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 abd27bf3c6..b3afc8c114 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,10 +1,10 @@
import { Asset } from "@webstudio-is/prisma-client";
-import { useEffect, useMemo, useState } from "react";
+import { useEffect, useState } from "react";
import { Box } from "~/shared/design-system";
import placholderImage from "~/shared/images/image-placeholder.svg";
import brokenImage from "~/shared/images/broken-image-placeholder.svg";
-const useImageWithFallbaack = ({ path }: { path: string }) => {
+const useImageWithFallback = ({ path }: { path: string }) => {
const [src, setSrc] = useState(placholderImage);
useEffect(() => {
@@ -23,14 +23,12 @@ export const AssetManagerImage = ({
}: {
asset: Asset;
}) => {
- const src = useImageWithFallbaack({ path });
+ const src = useImageWithFallback({ path });
return (
<Box
title={alt || ""}
css={{
aspectRatio: "1/1",
- width: "100%",
- height: "100%",
backgroundImage: `url(${src})`,
backgroundSize: "contain",
}}