Support » Plugin: Mobile Featured Image » Feature request please?

  • Resolved expat

    (@expat)


    thanks for this plugin and great to see people thinking about speed….

    1. Can you explain to me how WP is generating the featured image? I thought it was just using the thumbnail setting in WP to generate that featured image. From your description, WP is using a image srcset to deliver the thumbnail size according to the screen size, which is not useful on smaller screen (screen size vs net speed)

    2. is there a way to auto generate this mobile thumbnail, automatically?

    thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Hoover

    (@ryanshoover)

    Hey @expat!

    Let me see if I can clarify how WordPress handles the image tag and how this plugin modifies that code.

    1. WordPress creates an image tag that looks something like my sample below. There’s the standard src attribute that defines the basic image path. WordPress also adds the srcset attribute that contains a number of different sizes for your featured image. Smaller devices will load a smaller image (since they don’t need the large version needed for a big monitor). The number after an image name determines what size screen will load that image. 959w will load on any screen that is 959 pixels wide or less.

    
    <img 
        src="my-featured-image.jpg" 
        srcset="my-featured-image.jpg 4288w, 
                my-featured-image-1024x373.jpg 1024w, 
                my-featured-image-959x349.jpg 959w" 
        sizes="100vw" >
    

    2. In terms of auto generating the mobile thumbnail, WordPress already does that for you! When you upload an image WP will make several different versions of it at different image sizes. And the srcset attribute will automatically apply the mobile thumbnail to mobile devices. One small thing to note – your theme defines what image sizes get created, and each theme creates different image sizes.

    I hope that answers your questions. If not, let me know.

Viewing 1 replies (of 1 total)
  • The topic ‘Feature request please?’ is closed to new replies.