I use several Image components in a view and they do not have captions. The Image class has multiple constructors;
Image()
Image(String caption)
Image(String caption, Resource source)
And when I use the one with both parameters with an empty string as caption, then the image has a caption area and appears further down.
So in order to have no caption area for the image, I have to call the empty constructor, and then set the resource using image.setSource(myResource);
(Or keep using the 2-param constructor with empty string and then call image.setCaption(null);
which also works, but doesn’t make much sense to me)
Is this intended? Why not just add another constructor Image(Resource source)
? It almost seems like the caption is more essential to an image than its source.