unbroke a lot of tests, made Resources handling of imgs more extensible (like for css/js files)