Tag: WebP

  • HTML: Creating Interactive Web Image Galleries with the `picture` and `source` Elements

    In the ever-evolving landscape of web design, the ability to present images effectively is paramount. Modern websites demand more than just static displays; they require responsive, optimized, and visually appealing image galleries. This tutorial dives deep into the power of the HTML `picture` and `source` elements, two often-underutilized tools that empower developers to create truly interactive and adaptive image galleries. We’ll explore how these elements facilitate responsive images, offer multiple image formats for different browsers, and ultimately, enhance the user experience across various devices and screen sizes. Mastering these elements is crucial for any developer aiming to build modern, performant, and accessible websites.

    Understanding the Problem: Static Images vs. Responsive Galleries

    Before we delve into the solution, let’s understand the problem. Traditionally, images were added to websites using the `img` tag. While straightforward, this approach presents several limitations, especially in a world of diverse devices and screen sizes:

    • Responsiveness Challenges: A single image size often doesn’t scale well across different devices. A large image might look great on a desktop but slow down loading times on a mobile phone.
    • Lack of Format Flexibility: The `img` tag supports a limited range of image formats. Modern formats like WebP offer superior compression and quality, but older browsers may not support them.
    • Performance Bottlenecks: Serving large, unoptimized images can significantly impact website performance, leading to slow loading times and a poor user experience.

    The `picture` and `source` elements provide a robust solution to these challenges, enabling developers to create image galleries that are responsive, optimized, and adaptable to various user environments.

    Introducing the `picture` and `source` Elements

    The `picture` element acts as a container for multiple `source` elements and a single `img` element. The `source` elements specify different image sources based on media queries (e.g., screen size, resolution), while the `img` element provides a fallback for browsers that don’t support the `picture` element or when no `source` matches the current conditions. Let’s break down the key components:

    • `picture` Element: The parent element that encapsulates the image and its various sources. It doesn’t render anything directly but acts as a container.
    • `source` Element: Specifies different image sources based on media queries. It has attributes like `srcset` (specifying the image source and sizes) and `media` (specifying the media query).
    • `img` Element: The default image element that is displayed if no `source` matches the conditions or for browsers that do not support the `picture` element.

    Step-by-Step Guide: Building a Responsive Image Gallery

    Let’s walk through creating a simple, yet effective, responsive image gallery using the `picture` and `source` elements. We’ll start with a basic HTML structure and then add CSS for styling.

    1. HTML Structure

    Here’s the basic HTML structure for a single image in our gallery:

    <picture>
      <source srcset="image-small.webp" type="image/webp" media="(max-width: 600px)">
      <source srcset="image-medium.webp" type="image/webp" media="(max-width: 1024px)">
      <source srcset="image-large.webp" type="image/webp">
      <img src="image-large.jpg" alt="Descriptive image alt text">
    </picture>
    

    Explanation:

    • The `picture` element wraps the entire image structure.
    • Three `source` elements are used to provide different image sources.
    • `srcset`: Specifies the image file and its size (e.g., “image-small.webp”).
    • `type`: Indicates the image format (e.g., “image/webp”).
    • `media`: Defines the media query. In this case, it specifies the screen width.
    • The `img` element acts as a fallback and provides an image for browsers that don’t support the `picture` element or when no `source` matches the media queries.
    • `alt`: Crucially, the `alt` attribute provides alternative text for screen readers and search engines, making the image accessible.

    2. Image Preparation

    Before implementing the HTML, you’ll need to prepare your images. It’s recommended to create multiple versions of each image with different sizes and formats. For instance:

    • `image-small.webp`: Optimized for small screens (e.g., mobile phones).
    • `image-medium.webp`: Optimized for medium screens (e.g., tablets).
    • `image-large.webp`: Optimized for larger screens (e.g., desktops).
    • `image-large.jpg`: A fallback in a widely supported format.

    Use image editing software or online tools to create these different versions. Ensure the image formats are optimized for the web (e.g., WebP for superior compression and quality).

    3. CSS Styling (Optional but Recommended)

    While the `picture` and `source` elements handle image selection, CSS is essential for styling and layout. Here’s a basic CSS example for our image gallery:

    picture {
      display: block; /* Ensures the picture element behaves like a block-level element */
      margin-bottom: 20px; /* Adds spacing between images */
    }
    
    img {
      width: 100%; /* Makes the image responsive and fit the parent container */
      height: auto; /* Maintains the aspect ratio */
      border: 1px solid #ccc; /* Adds a subtle border */
      border-radius: 5px; /* Adds rounded corners */
    }
    

    Explanation:

    • `display: block;`: Makes the `picture` element a block-level element, which is important for proper layout.
    • `width: 100%;`: Ensures the image always fits its container.
    • `height: auto;`: Maintains the image’s aspect ratio.

    4. Complete Example

    Here’s the complete HTML and CSS example, combining all the elements:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Responsive Image Gallery</title>
      <style>
        picture {
          display: block;
          margin-bottom: 20px;
        }
    
        img {
          width: 100%;
          height: auto;
          border: 1px solid #ccc;
          border-radius: 5px;
        }
      </style>
    </head>
    <body>
    
      <picture>
        <source srcset="image-small.webp" type="image/webp" media="(max-width: 600px)">
        <source srcset="image-medium.webp" type="image/webp" media="(max-width: 1024px)">
        <source srcset="image-large.webp" type="image/webp">
        <img src="image-large.jpg" alt="A beautiful landscape">
      </picture>
    
      <picture>
        <source srcset="image-small2.webp" type="image/webp" media="(max-width: 600px)">
        <source srcset="image-medium2.webp" type="image/webp" media="(max-width: 1024px)">
        <source srcset="image-large2.webp" type="image/webp">
        <img src="image-large2.jpg" alt="A portrait of a person">
      </picture>
    
    </body>
    </html>
    

    Explanation:

    • The HTML includes two `picture` elements, each representing an image in the gallery.
    • Each `picture` element contains multiple `source` elements with different `srcset`, `type`, and `media` attributes.
    • The `img` element provides the fallback image and the `alt` text.
    • The CSS styles the `picture` and `img` elements for a clean and responsive layout.

    Advanced Techniques and Customization

    Once you’ve mastered the basics, you can explore more advanced techniques to enhance your image galleries:

    1. Art Direction

    Art direction allows you to show different versions of an image depending on the screen size. For example, you might crop or zoom in on a photo to highlight a specific detail on smaller screens. This is a powerful feature that goes beyond simple resizing.

    <picture>
      <source srcset="image-portrait-small.webp" media="(max-width: 600px)">
      <source srcset="image-landscape-medium.webp" media="(max-width: 1024px)">
      <img src="image-landscape-large.jpg" alt="Descriptive image alt text">
    </picture>
    

    Explanation:

    • On small screens (max-width: 600px), a portrait version of the image is shown.
    • On medium screens (max-width: 1024px), a landscape version is displayed.
    • On larger screens, the landscape version serves as the default.

    2. Lazy Loading

    Lazy loading defers the loading of images until they are needed (e.g., when they enter the viewport). This can significantly improve initial page load times, especially for galleries with many images. While the `picture` element itself doesn’t offer native lazy loading, you can use JavaScript or the `loading=”lazy”` attribute on the `img` element (supported by most modern browsers) to achieve this.

    <picture>
      <source srcset="image-small.webp" type="image/webp" media="(max-width: 600px)">
      <source srcset="image-medium.webp" type="image/webp" media="(max-width: 1024px)">
      <source srcset="image-large.webp" type="image/webp">
      <img src="image-large.jpg" alt="Descriptive image alt text" loading="lazy">
    </picture>
    

    Explanation:

    • The `loading=”lazy”` attribute on the `img` tag tells the browser to load the image only when it’s near the viewport.

    3. Adding Captions and Descriptions

    Enhance the user experience by adding captions and descriptions to your images. Use the `figcaption` element within the `figure` element to achieve this. The `figure` element semantically groups the image and its associated caption.

    <figure>
      <picture>
        <source srcset="image-small.webp" type="image/webp" media="(max-width: 600px)">
        <source srcset="image-medium.webp" type="image/webp" media="(max-width: 1024px)">
        <source srcset="image-large.webp" type="image/webp">
        <img src="image-large.jpg" alt="A beautiful sunset over the ocean">
      </picture>
      <figcaption>A stunning sunset captured on the coast.</figcaption>
    </figure>
    

    Explanation:

    • The `figure` element wraps the `picture` element and the `figcaption`.
    • The `figcaption` element contains the image caption.

    4. Creating Image Galleries with JavaScript

    While the `picture` and `source` elements are excellent for image optimization and responsiveness, you can combine them with JavaScript to create interactive galleries. For example, you could add features like:

    • Lightbox Effect: Click an image to display it in a larger, modal window.
    • Image Zoom: Allow users to zoom in on images for more detail.
    • Image Navigation: Add previous/next buttons to navigate through the gallery.

    This is where JavaScript frameworks or libraries like LightGallery or Fancybox can be helpful. However, the underlying HTML structure with `picture` and `source` will still be essential for image optimization.

    Common Mistakes and Troubleshooting

    Here are some common mistakes and how to fix them when working with the `picture` and `source` elements:

    1. Incorrect `srcset` and `media` Attributes

    Problem: Images don’t display correctly, or the wrong images are displayed on different devices.

    Solution: Double-check the values of the `srcset` and `media` attributes.

    • `srcset`: Ensure the image file paths are correct and that you’ve created different image sizes.
    • `media`: Verify that your media queries (e.g., `(max-width: 600px)`) are correct and that they target the desired screen sizes. Test your gallery on various devices and screen sizes to ensure proper behavior.

    2. Missing or Incorrect `type` Attribute

    Problem: The browser might not display the image if the `type` attribute doesn’t match the image format.

    Solution: Always include the `type` attribute in your `source` elements, and make sure it accurately reflects the image format. For example, use `type=”image/webp”` for WebP images, `type=”image/jpeg”` for JPEG images, and `type=”image/png”` for PNG images.

    3. Ignoring the `alt` Attribute

    Problem: Poor accessibility and SEO implications.

    Solution: Always include the `alt` attribute on the `img` element. The `alt` attribute provides alternative text for screen readers and search engines, describing the image’s content. A descriptive `alt` attribute improves accessibility for users with visual impairments and helps search engines understand the image’s context.

    4. Incorrect CSS Styling

    Problem: Images might not be responsive or might not fit their containers properly.

    Solution: Use CSS to style the `picture` and `img` elements. Key CSS properties include:

    • `width: 100%;` (for `img`): Makes the image responsive and fit the parent container.
    • `height: auto;` (for `img`): Maintains the image’s aspect ratio.
    • `display: block;` (for `picture`): Ensures the `picture` element behaves as a block-level element for proper layout.

    5. Not Testing on Different Devices

    Problem: The gallery may not look or function correctly on all devices.

    Solution: Thoroughly test your image gallery on various devices and screen sizes (desktops, tablets, and phones). Use your browser’s developer tools to simulate different screen sizes and resolutions. Consider using online tools or browser extensions for cross-browser testing.

    Key Takeaways and Best Practices

    Here’s a summary of the key takeaways and best practices for creating interactive image galleries with the `picture` and `source` elements:

    • Use the `picture` element: It’s the foundation for responsive image galleries.
    • Leverage `source` elements: Provide multiple image sources for different screen sizes and formats.
    • Optimize images: Create different image sizes and formats (e.g., WebP) to improve performance.
    • Use `alt` attributes: Essential for accessibility and SEO.
    • Apply CSS styling: Control the layout and appearance of your gallery.
    • Consider lazy loading: Improve initial page load times.
    • Test thoroughly: Ensure your gallery works across different devices and browsers.
    • Explore art direction: Show different image versions for different contexts.
    • Combine with JavaScript: Enhance interactivity with features like lightboxes and zoom effects.

    FAQ

    Here are some frequently asked questions about creating image galleries with HTML:

    1. What is the difference between `srcset` and `sizes`?

    Both `srcset` and `sizes` are used with the `img` tag to provide responsive images. However, they serve different purposes:

    • `srcset`: Specifies a list of image sources and their sizes (e.g., “image-small.jpg 480w, image-medium.jpg 768w”). The browser uses this information to select the best image based on the device’s screen resolution and other factors. The `w` descriptor indicates the image’s intrinsic width.
    • `sizes`: Describes the size of the image in the current context (e.g., “(max-width: 600px) 100vw, 50vw”). It tells the browser how much space the image will occupy on the screen. The `vw` unit represents the viewport width.

    When used with the `picture` element, the `srcset` attribute is used within the `source` tag, while the `sizes` attribute is not typically used. Instead, media queries within the `source` tags are used to target different screen sizes.

    2. Can I use the `picture` element without the `source` element?

    Yes, you can use the `picture` element with only the `img` element. However, this defeats the purpose of the `picture` element, which is to provide multiple image sources for different scenarios. If you only want to display a single image, you can simply use the `img` tag.

    3. What image formats should I use?

    The best image format depends on your needs:

    • WebP: Offers superior compression and quality compared to JPEG and PNG. It’s the recommended format for most web images, but ensure good browser support.
    • JPEG: Suitable for photographs and images with many colors.
    • PNG: Best for images with transparency or sharp lines (e.g., logos, icons).
    • SVG: For vector graphics that scale without losing quality.

    It’s generally a good practice to provide a WebP version of your images and a fallback (e.g., JPEG or PNG) for older browsers that don’t support WebP.

    4. How do I make my image gallery accessible?

    Accessibility is crucial for a good user experience. Here’s how to make your image gallery accessible:

    • Use descriptive `alt` attributes: Provide meaningful alternative text for all images.
    • Use semantic HTML: Use the `figure` and `figcaption` elements to group images and captions.
    • Provide keyboard navigation: Ensure users can navigate the gallery using the keyboard.
    • Ensure sufficient color contrast: Make sure text and background colors have enough contrast for readability.
    • Test with a screen reader: Use a screen reader to verify that your gallery is accessible.

    5. How can I further optimize my image gallery for SEO?

    Optimizing your image gallery for search engines can improve your website’s visibility:

    • Use descriptive filenames: Name your image files with relevant keywords (e.g., “blue-mountain-landscape.jpg” instead of “image1.jpg”).
    • Write compelling `alt` text: Include relevant keywords in your `alt` attributes.
    • Use structured data (Schema.org): Mark up your images with structured data to provide more information to search engines.
    • Optimize image file size: Compress your images to reduce file size and improve loading times.
    • Create a sitemap: Include your image URLs in your website’s sitemap.

    By following these guidelines, you can create image galleries that are not only visually appealing and interactive but also accessible and optimized for search engines.

    The `picture` and `source` elements are more than just tools; they are essential components for building modern, responsive, and user-friendly websites. By understanding their capabilities and applying best practices, you can create image galleries that not only showcase your content beautifully but also adapt seamlessly to the ever-changing landscape of web design. Embrace these elements, experiment with their functionalities, and unlock the full potential of your image-rich web projects. The ability to present images effectively is a cornerstone of a compelling online presence, and these tools are your key to mastering that art.

  • HTML Image Optimization: A Practical Guide for Faster Websites

    In the fast-paced world of web development, where user experience reigns supreme, website speed is a critical factor. Slow-loading websites not only frustrate users but also negatively impact search engine rankings. A significant contributor to website load times is often the size and optimization of images. This tutorial dives deep into the world of HTML image optimization, providing you with the knowledge and practical skills to significantly improve your website’s performance and user experience.

    Why Image Optimization Matters

    Images are essential for conveying information, enhancing visual appeal, and engaging users. However, unoptimized images can be a significant bottleneck, leading to slower page load times. This can result in:

    • Higher Bounce Rates: Users are less likely to wait for a slow-loading website.
    • Poor Search Engine Rankings: Google and other search engines prioritize fast-loading websites.
    • Negative User Experience: Slow websites frustrate users and damage your brand reputation.
    • Increased Bandwidth Costs: Larger image files consume more bandwidth, potentially increasing hosting costs.

    By optimizing images, you can reduce file sizes without sacrificing quality, leading to faster load times, improved user experience, and better search engine rankings.

    Understanding Image Formats

    Choosing the right image format is crucial for optimization. Different formats are designed for different types of images, each with its own advantages and disadvantages.

    JPEG (JPG)

    JPEG is a lossy compression format, meaning it reduces file size by discarding some image data. It’s best suited for photographs and images with many colors and gradients. The degree of compression can be adjusted, allowing you to balance file size and image quality.

    Pros:

    • Excellent for photographs and complex images.
    • Good balance between file size and quality.
    • Widely supported by all browsers.

    Cons:

    • Lossy compression can degrade image quality, especially with high compression levels.
    • Not ideal for images with sharp lines or text.

    PNG

    PNG is a lossless compression format, meaning it preserves all image data, resulting in higher quality images. It’s best suited for images with sharp lines, text, and transparency. PNG files are generally larger than JPEG files.

    Pros:

    • Lossless compression preserves image quality.
    • Supports transparency (alpha channel).
    • Excellent for images with text, logos, and sharp lines.

    Cons:

    • Larger file sizes compared to JPEG, especially for photographs.

    GIF

    GIF is a lossless compression format primarily used for animated images. It supports a limited color palette (256 colors), making it less suitable for photographs. GIFs are often used for simple animations and logos.

    Pros:

    • Supports animation.
    • Widely supported by all browsers.

    Cons:

    • Limited color palette (256 colors).
    • Larger file sizes compared to JPEG for static images.

    WebP

    WebP is a modern image format developed by Google, offering superior compression and quality compared to JPEG and PNG. It supports both lossy and lossless compression, as well as transparency and animation. WebP is becoming increasingly popular due to its excellent performance.

    Pros:

    • Superior compression and quality compared to JPEG and PNG.
    • Supports both lossy and lossless compression.
    • Supports transparency and animation.

    Cons:

    • Browser support was limited in the past, but is now widely supported.

    Choosing the Right Format

    The best image format depends on the image content and your specific needs.

    • Photographs: JPEG is generally the best choice, as it offers a good balance between file size and quality.
    • Images with text, logos, or sharp lines: PNG is a better choice, as it preserves image quality.
    • Animations: GIF is the standard for simple animations, although WebP can also be used.
    • For maximum compression and quality: WebP is often the best choice for both static and animated images.

    Optimizing Images for the Web

    Once you’ve chosen the right image format, you can optimize your images using several techniques.

    Image Compression

    Image compression reduces file size by eliminating unnecessary data. You can compress images using various tools and techniques.

    Lossy Compression

    Lossy compression reduces file size by discarding some image data. This is often used for JPEG images, where you can adjust the compression level to balance file size and image quality.

    Lossless Compression

    Lossless compression reduces file size without discarding any image data. This is often used for PNG and GIF images.

    Image Resizing

    Resizing images to the correct dimensions is crucial. Don’t upload a large image and then scale it down in your HTML. This increases the file size unnecessarily. Resize images to the exact dimensions they will be displayed on your website.

    Using the <picture> Element and `srcset` Attribute

    The <picture> element and srcset attribute allow you to provide multiple image sources for different screen sizes and resolutions, optimizing the image delivery for various devices.

    <picture>
      <source srcset="image-small.webp 480w, image-medium.webp 768w, image-large.webp 1200w" sizes="(max-width: 480px) 100vw, (max-width: 768px) 50vw, 33vw" type="image/webp">
      <img src="image.jpg" alt="My Image">
    </picture>
    

    In this example:

    • The <picture> element acts as a container for different image sources.
    • The <source> element specifies different image sources based on screen size using the srcset and sizes attributes.
    • srcset specifies the image URLs and their widths (e.g., image-small.webp 480w means image-small.webp is 480 pixels wide).
    • sizes specifies the image size based on the viewport width (e.g., (max-width: 480px) 100vw means the image will take up 100% of the viewport width on screens up to 480 pixels wide).
    • The type attribute specifies the image format (e.g., image/webp).
    • The <img> element provides a fallback image for browsers that don’t support the <picture> element or WebP format.

    Lazy Loading

    Lazy loading defers the loading of images until they are needed, improving initial page load time. This is particularly useful for images that are below the fold (i.e., not immediately visible on the screen).

    You can implement lazy loading using the loading="lazy" attribute on your <img> tags.

    <img src="image.jpg" alt="My Image" loading="lazy">
    

    Using Image Optimization Tools

    Several tools are available to help you optimize your images.

    Online Image Optimizers

    These tools allow you to upload images and automatically optimize them. Examples include:

    • TinyPNG
    • Compressor.io
    • ImageOptim

    Image Editing Software

    Software like Adobe Photoshop, GIMP, and Affinity Photo provide advanced image optimization features, allowing you to control compression levels, resize images, and convert between formats.

    Command-Line Tools

    Command-line tools offer more control and automation options. Examples include:

    • ImageMagick
    • OptiPNG
    • jpegoptim
    • WebP Codec

    Step-by-Step Guide: Optimizing an Image

    Let’s walk through a practical example of optimizing an image for your website.

    1. Choose Your Image

    Select the image you want to optimize. Consider the image’s content and intended use to determine the appropriate format.

    2. Resize the Image

    Determine the dimensions the image will be displayed on your website. Use an image editing tool to resize the image to these exact dimensions. This prevents the browser from having to scale the image, saving bandwidth and improving performance.

    3. Choose the Right Format

    If the image is a photograph, consider using JPEG. If it has transparency or sharp lines, consider PNG. If you want the best possible compression and quality, consider WebP.

    4. Compress the Image

    Use an image optimization tool to compress the image. For JPEG images, adjust the compression level to balance file size and quality. For PNG images, use lossless compression to reduce file size without sacrificing quality. For WebP images, choose the appropriate compression method.

    5. Implement the Image in Your HTML

    Use the <img> tag to embed the optimized image in your HTML. Include the alt attribute for accessibility and SEO.

    <img src="optimized-image.jpg" alt="Description of the image">
    

    If you’re using the <picture> element, include the srcset and sizes attributes for responsive images.

    6. Test and Verify

    Test your website’s performance using tools like Google PageSpeed Insights or GTmetrix to verify that the image optimization has improved your page load times. Check the image’s visual quality to ensure it meets your standards.

    Common Mistakes and How to Fix Them

    Uploading Large Images

    Mistake: Uploading images that are much larger than they need to be.

    Fix: Always resize images to the exact dimensions they will be displayed on your website before uploading them. Use image compression tools to reduce file size.

    Using the Wrong Image Format

    Mistake: Using the wrong image format for the image content.

    Fix: Choose the appropriate image format based on the image’s content. Use JPEG for photographs, PNG for images with transparency or sharp lines, and WebP for the best compression and quality.

    Neglecting the `alt` Attribute

    Mistake: Not including the alt attribute in your <img> tags.

    Fix: Always include the alt attribute and provide a descriptive text that accurately describes the image. This is important for accessibility and SEO.

    Ignoring Image Optimization Tools

    Mistake: Not using image optimization tools to compress and optimize images.

    Fix: Utilize image optimization tools, such as TinyPNG, Compressor.io, or ImageOptim, to automatically compress and optimize your images. Use image editing software to resize and format your images.

    Summary / Key Takeaways

    • Image optimization is critical for improving website speed and user experience.
    • Choose the right image format based on the image content.
    • Compress and resize images to reduce file size.
    • Use the <picture> element and srcset attribute for responsive images.
    • Implement lazy loading for images below the fold.
    • Utilize image optimization tools to automate the optimization process.

    FAQ

    1. What is the difference between lossy and lossless compression?

    Lossy compression reduces file size by discarding some image data, while lossless compression reduces file size without discarding any image data. Lossy compression can result in some loss of image quality, while lossless compression preserves image quality.

    2. What is the best image format for photographs?

    JPEG is generally the best choice for photographs, as it offers a good balance between file size and quality.

    3. What is the benefit of using the <picture> element and srcset attribute?

    The <picture> element and srcset attribute allow you to provide multiple image sources for different screen sizes and resolutions, optimizing image delivery for various devices, leading to faster load times and improved user experience.

    4. How does lazy loading improve website performance?

    Lazy loading defers the loading of images until they are needed, which reduces the initial page load time. This is particularly beneficial for images that are below the fold, as they are not immediately visible to the user.

    5. Where can I find image optimization tools?

    You can find image optimization tools online (e.g., TinyPNG, Compressor.io), in image editing software (e.g., Adobe Photoshop, GIMP), and as command-line tools (e.g., ImageMagick, OptiPNG).

    Image optimization is an ongoing process. As web technologies evolve, new image formats and optimization techniques will emerge. Staying informed and continuously refining your image optimization strategies is essential to maintaining a fast, efficient, and user-friendly website. By implementing these practices, you can create a more engaging experience for your visitors, improve your search engine rankings, and ultimately achieve your web development goals. The effort invested in optimizing images yields substantial returns, translating to a more responsive and enjoyable web presence, which is a key factor in attracting and retaining users in today’s competitive online landscape.