diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs
index 11c430a2d..35d2bd7f0 100644
--- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs
+++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs
@@ -209,7 +209,8 @@
 
         props         #js {:id (dm/str "stroke-color-gradient-" render-id "-" index)
                            :gradient gradient
-                           :shape shape}
+                           :shape shape
+                           :force-transform (cfh/path-shape? shape)}
         stroke-image  (:stroke-image stroke)
         uri           (when stroke-image (cf/resolve-file-media stroke-image))
 
@@ -248,7 +249,8 @@
                   :width (/ w (dm/get-prop selrect :width))
                   :height (/ h (dm/get-prop selrect :height))
                   :viewBox "0 0 1 1"
-                  :preserveAspectRatio "xMidYMid slice"}
+                  :preserveAspectRatio "xMidYMid slice"
+                  :patternTransform (when (cfh/path-shape? shape) (gsh/transform-str shape))}
         [:> :image image-props]])
 
      (cond
diff --git a/frontend/src/app/main/ui/shapes/gradients.cljs b/frontend/src/app/main/ui/shapes/gradients.cljs
index 1b44a76c3..d2a74a119 100644
--- a/frontend/src/app/main/ui/shapes/gradients.cljs
+++ b/frontend/src/app/main/ui/shapes/gradients.cljs
@@ -30,9 +30,9 @@
 
 (mf/defc linear-gradient
   {::mf/wrap-props false}
-  [{:keys [id gradient shape]}]
+  [{:keys [id gradient shape force-transform]}]
   (let [transform (mf/with-memo [shape]
-                    (when (cfh/frame-shape? shape)
+                    (when force-transform
                       (gsh/transform-matrix shape nil (gpt/point 0.5 0.5))))
 
         metadata? (mf/use-ctx ed/include-metadata-ctx)