I need to preload some images off-screen while page is loading and also - in a seperate case - serve smaller versions (ie cropped) of the same images to mobile.
What is the best way of doing this, preferably without a plugin?
You can add lazy loading to your image tags...
<img src="/path/to/image" width="640" height="480" alt="My image" loading="lazy">
You can use the native image manipulations to generate cropped images for mobile. Than you can use css to display the smaller ones to small screens. But it might be cleaner to use Mo Variables (free addon) to detect if a mobile device visits the page and only load the correct image {if is_phone}load small image{/if} {if is_desktop}load large image{/if}
Same goes for preloading i guess