New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Best practice to work with mobile and desktop (background) images?

Sophie January 21, 2021 by Sophie

Hey all,

I am working on a project which involves different uploads for mobile and desktop backgrounds. What is the best way to do this? Ofcourse I can use display none and display block with media queries, but I'm hoping for a solution where only the mobile image loads on mobile, and only the desktop image loads on desktop so it is better for the page load.

The reason why I am asking this on the Statamic forum is because there maybe is a solution with a if/else statement or an addon I've missed.

Answered by Sophie!
>>>>>>> Answered <<<<<<<
5 Replies