Skip to content
  • home
  • portfolio
  • web design journal
  • blog
    • adventure
    • san diego
    • projects
    • website design
    • code notes
Blog Web Dev Different Image Files Based on Browser Width

Different Image Files Based on Browser Width

By Forrest Smith - Drempd.com

.ipad,.mobile{display:none;}



@media(max-width: 768px){

  .desktop,.mobile{

    display:none;

  }

  .ipad{

    display:block;

  }

}

@media(max-width: 500px){

  .desktop,.ipad{

    display:none;

  }

  .mobile{

    display:block;

  }

}




<img src="image-file-desktop" class="desktop">

<img src="image-file-ipad" class="ipad">

<img src="image-file-mobile" class="mobile">

Posted on August 25, 2022August 28, 2025 in Web Dev

drempd | san diego, ca


home contact

adventures san diego projects stream website design

portfolio resume san diego web design freelance web designer

custom web design responsive web design website maintenance