Added support for html fragments and images