Fix error handling for img-tag
Added support for "package-paths" attribute
Fixed error handling