Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Alternate to using background images for sizing

  • Good Day,

    I am currently using the advanced setting on “Backgrounds” using wider images for desktop and longer images for mobile. Is there an alternative to the “background” feature to achieve this same result? For example having a completely different image or size appear on desktop from what appears on mobile without using the advanced “background” feature? My understanding is that images do not get indexed when using this feature.

    I understand images (png, jpg) get resized from desktop to mobile but interested if there is an option to change image or ratio and not use “background”.

    I’ve added a url below as an example.

    Thank you for your insight and assistance!

    Sincerely,
    Darin

  • Hi there,

    I understand images (png, jpg) get resized from desktop to mobile but interested if there is an option to change image or ratio and not use “background”.

    No, images are HTML, while background image is CSS. You can not change HTML easily.

    But you should be able to use CSS to change its ratio for different screen widths.

  • Thank you Ying. I appreciate your explanation.

    One last question. Is there a feature to use a different (html) image for Mobile instead of resizing the Desktop image for mobile using CSS?

    Thanks again!

    Darin

  • No, there isn’t a built-in solution for this, as I said changing HTML is not that easy.

    You might want to use 2 image blocks, one for mobile and one for desktop, and hide one of them using the hid on desktop/hide-on-mobile option of GB blocks. https://docs.generateblocks.com/article/advanced-options-overview/#hide-on-options-pro-feature

  • Thank you for the information Ying! I will give your recommendation a try.

    Much appreciated.
    Have a great day! 🙂

    Darin

  • You are welcome   🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.