Reputation: 516
I use vaadin 7.5.3 I want to add logo my web site page top with logo Url : http://...../example.png
But I want to read image on internet URL
Upvotes: 2
Views: 4906
Reputation: 57738
For anyone else who finds this answer while searching for a more recent version of Vaadin, this worked for me in Vaadin v24:
private Image iconImage = new Image();
String iconURL = "https://api.weather.gov/icons/land/day/few?size=medium";
iconImage.setSrc(iconURL);
Upvotes: 0
Reputation: 1068
Personally, I'd do something more simple. I'd add a label with some HTML like this.
Label logo = new Label("<a href=\"http://www.maski.gov.tr\"><img src=\"http://www.maski.gov.tr/Maski.PNG\"></a>", ContentMode.HTML)
Upvotes: 0
Reputation: 11
Image image = new Image();
image.setSource(new ExternalResource("http://www.maski.gov.tr/Maski.PNG"));
image.setWidth("207px");
image.setHeight("80px");
Upvotes: 1
Reputation: 4967
You can use ExternalResource
with the Image
component to display an image from an external URL:
Image image = new Image();
image.setSource(new ExternalResource("http://www.maski.gov.tr/Maski.PNG"));
Upvotes: 6