• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to use a figure/picture tag for an image on the homepage (Monochrome Pro)?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Genesis Blocks › How to use a figure/picture tag for an image on the homepage (Monochrome Pro)?

This topic is: not resolved

Tagged: figure, picture tag for image, webp file

  • This topic has 0 replies, 1 voice, and was last updated 1 month, 3 weeks ago by cesare.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • January 31, 2023 at 8:50 am #506660
    cesare
    Participant

    Hi,
    I would like to use the a

    <figure style="background-image: url(path/to/image.jpg); background-size: cover; background-repeat: no-repeat; height: 300px;">
      <picture >
        <source type="image/webp" srcset="path/to/image.webp">
        <img src="path/to/image.jpg" alt="">
      </picture >
    </figure>

    tag to specify different file types for the same image on the homepage of Monochrome Pro, i.e. mainly a webp file and if not supported by the browser a jpg file as fall back option.

    In the block in the backend I can only select an image, i.e. alternative formats are not provided.

    I guess I would have to do that in one of the theme files (.php) but I wouldn't know which one and how to incorporate this.

    Maybe somebody has an example for that.

    Thanks for your help.

    Cheers,
    Cesare

    https://www.cesaremarchetti.ch/
  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble