Description
I think LocalizedImageResource.setSrcAttribute(...) shouldn't
reset the resource field to null if locales (and styles) don't match, since
Resource doesn't seem to be locale/style specific (unlike
ResourceReference) and cannot be reloaded/recomputed
as the commentary (incorrectly) suggests if the
Image(String id, Resource imageResource) constructor was
used.
In the meantime, the following workaround can be used: just wrap
the Resource with a Model.
e.g. instead of Image(String id, Resource imageResource)
use Image(String id, new Model(Resource imageResource))