You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.html.

Class Image

    • Method Detail

      • getSrc

        public String getSrc()

        Gets the image URL.

        Returns:

        the image URL

      • setSrc

        public void setSrc​(String src)

        Sets the image URL.

        Parameters:

        src - the image URL

      • setAlt

        public void setAlt​(String alt)

        Sets the alternate text for the image.

        Parameters:

        alt - the alternate text

      • getAlt

        public Optional<String> getAlt()

        Gets the alternate text for the image.

        Returns:

        an optional alternate text, or an empty optional if no alternate text has been set