diff --git a/src/block.json b/src/block.json
index 45021a8..0437c5a 100644
--- a/src/block.json
+++ b/src/block.json
@@ -22,14 +22,14 @@
"type": "string",
"source": "attribute",
"selector": ".img-primary",
- "attribute": "src",
+ "attribute": "data-src",
"default": ""
},
"imgUrlHover": {
"type": "string",
"source": "attribute",
"selector": ".img-secondary",
- "attribute": "src",
+ "attribute": "data-src",
"default": ""
}
}
diff --git a/src/edit.js b/src/edit.js
index 62bba54..ae89ff2 100644
--- a/src/edit.js
+++ b/src/edit.js
@@ -9,6 +9,7 @@ import {
} from "@wordpress/block-editor";
import {
__experimentalNumberControl as NumberControl,
+ Button,
ToggleControl,
Panel,
PanelBody,
@@ -121,10 +122,18 @@ export default function Edit({ attributes, setAttributes, clientId }) {
}}
allowedTypes={["image"]}
multiple={false}
- labels={{ title: "Central Image" }}
mediaPreview={
attributes.imgUrl !== "" ? (
-
+
No image selected.
) @@ -132,6 +141,9 @@ export default function Edit({ attributes, setAttributes, clientId }) { /> +No image selected.
) @@ -180,8 +200,12 @@ export default function Edit({ attributes, setAttributes, clientId }) {