rewrite to accept an element instead of src url. this ultimately makes it much more flexible
caveats