Hi,
Yes, I suspect not setting the size is why the image is not working.
With your code, you can see the image has a width & height of 1.
'resize' is the name of the method, not the attribute. If you replace 'resize' with the following:
size: {
width: 100,
height: 40
},
You can see the image, now has the width & size you desire.
If I try the following, the image displays correctly.
var r2 = new joint.shapes.standard.Image({
position: {
x: 120,
y: 10
},
size: {
width: 100,
height: 40
},
attrs: {
label: {
text: 'Camera'
},
image: {
I think this should solve the issue from the code you provided. You can try it out locally and see.
Thanks,
James