Using image variant sizes for backgrounds
-
This has been discussed a lot on GitHub (here and here)for years but still not addressed by the Elementor team.
I would like to specify the image variant (large, small, banner etc) for a particular image, rather than using the full-sized image for backgrounds.
A work-around was suggested by a user on GitHub, but this has a major issue.
This work-around uses Elementors
$post_css->get-stylesheet()-add_rules()
functionality to modify a css class and then re-add it to the generated CSS. Unfortunately this newly updated class is added outside of any response media-type declarations. She when I use different images for different responsive layouts, the image for the desktop version is superseded by one of the other media types.Any idea how I could work around this, or modify the work-around code so that it correctly adds the updated class only for the correct target media-type?
- The topic ‘Using image variant sizes for backgrounds’ is closed to new replies.