<% LayoutImage.deletelink %>
render a link to delete action calls image.deletelink_macro, but only if the layout in path is the one this image belongs to

Sourcecode in LayoutImage/macros.js:
1:   function deletelink_macro(param) {
2:      if (path.Layout == this.layout)
3:         Image.prototype.deletelink_macro.apply(this, [param]);
4:      return;
5:   }