• 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

Responsive Images

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 › Archived Forums › General Discussion › Responsive Images

This topic is: not resolved
  • This topic has 9 replies, 2 voices, and was last updated 10 years, 5 months ago by Gregory.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • January 21, 2016 at 5:31 pm #177117
    Gregory
    Member

    We've defined several different images sizes through our functions.php file via add_image_size( ... ); which provides us with the options we need when adding featured images through Widgets. However, when we view a featured image on a post and/or page, we are noticing a bunch of additional srcset attributes being set in the html source code, one for each image size defined.

    I don't see this occurring in other Genesis/WP sites I've investigated. What is causing this behavior and is it normal?

    Thanks.

    Gregory

    January 21, 2016 at 6:46 pm #177122
    Brad Dalton
    Participant

    Please take a screenshot and link to it from here with an arrow pointing to what you are referring to.


    Tutorials for StudioPress Themes.

    January 21, 2016 at 7:01 pm #177124
    Gregory
    Member

    Hi Brad,

    Sure thing. Here's the long version:

    //* Add new featured image sizes
    add_image_size( 'home-bottom', 150, 100, TRUE );
    add_image_size( 'home-top', 400, 200, TRUE );
    
    // Add featured image sizes
    add_image_size( 'entry-image', 650 ); 
    add_image_size( 'featured-small', 320 );
    
    // Add other useful image sizes for use through Add Media modal
    add_image_size( 'small-width', 320 );
    add_image_size( 'medium-width', 480 );
    add_image_size( 'podcast', 200, 200 );
    add_image_size( 'twitter-in-stream', 506, 253 );
    add_image_size( 'facebook-link-timeline', 484, 252 );
    add_image_size( 'facebook-link-page', 470, 246 );
    add_image_size( 'facebook-image-timeline', 504, 0 );
    add_image_size( 'facebook-image-page', 470, 470 );
    add_image_size( 'front-page-hero', 1200, 9999 );
    add_image_size( 'podcast-thumbnail', 200, 9999 );
    add_image_size( 'podcast-feature', 300, 300 );
    add_image_size( 'portfolio', 300, 200 );
    add_image_size( 'slider', 1200, 500 );
    
    // Register the image sizes for use in Add Media modal
    add_filter( 'image_size_names_choose', 'sg_custom_sizes' );
    function sg_custom_sizes( $sizes ) {
        return array_merge( $sizes, array(
            'featured-large' => __( 'Featured Large' ),
            'featured-small' => __( 'Featured Small' ),
            'small-width' => __( 'Small Width' ),
            'medium-width' => __( 'Medium Width' ),
            'podcast' => __( 'Podcast' ),
            'twitter-in-stream' => __( 'Twitter In Stream' ),
            'facebook-link-timeline' => __( 'Facebook Link Timeline' ),
            'facebook-link-page' => __( 'Facebook Link Page' ),
            'facebook-image-timeline' => __( 'Facebook Image Timeline' ),
            'facebook-image-page' => __( 'Facebook Image Page' ),
            'front-page-hero' => __( 'Front Page Hero' ),
            'podcast-thumbnail' => __( 'Podcast Thumbnail' ),
            'podcast-feature' => __( 'Podcast Feature' ),
            'portfolio' => __( 'Portfolio' ),
            'slider' => __( 'Slider' ),
        ) );
    }

    And here's a screenshot of the produced source:

    https://www.dropbox.com/s/ynpfctlevddvrt0/wpAddImage.PNG?dl=0

    Thanks Brad.

    Gregory

    January 25, 2016 at 10:26 am #177455
    Gregory
    Member

    ... any ideas or is the source produced designed WP behavior?

    January 25, 2016 at 12:04 pm #177471
    Brad Dalton
    Participant

    From WordPress. Please post this question on the WordPress.org forums. It maybe related to the output from Jetpack.


    Tutorials for StudioPress Themes.

    January 25, 2016 at 12:25 pm #177476
    Gregory
    Member

    So from the code we posted above, the produced html source is NOT something you've seen before?

    January 25, 2016 at 12:45 pm #177478
    Brad Dalton
    Participant

    Its generated by wp.com. I have seen it before and think it comes from Jetpack.


    Tutorials for StudioPress Themes.

    January 25, 2016 at 1:01 pm #177481
    Gregory
    Member

    ... thanks.

    January 25, 2016 at 1:19 pm #177483
    Gregory
    Member

    ... I deactivated Photon (from within Jetpack) which did not resolve the issue. Posted the question to WP.org per your suggestion as well.

    January 25, 2016 at 1:25 pm #177487
    Gregory
    Member

    UPDATE

    Okay, by disabling Photon, I got rid of the wp.com entries, however, many of the other entries remain which I believe are not related to Jetpack:

    https://www.dropbox.com/s/p4qfwfa167lq1j6/wpAddImageII.PNG?dl=0

    Thoughts?

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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