Developer Diary
  • Developer Diary
  • 2019

    • June 2019
    • July 2019
    • August 2019
    • September 2019
    • October 2019
    • November 2019
    • December, 2019
  • 2020

    • January 2020
    • February 2020
    • March 2020
    • April 2020
    • May, 2020
    • June 2020
    • July 2020
    • August 2020
    • September 2020
    • October 2020
    • November 2020
    • December 2020
  • 2021

    • January 2021
    • February 2021
    • February 2021
    • April 2021
    • May 2021
    • June 2021
    • July 2021
    • August 2021
    • September 2021
    • October 2021
    • November 2021
    • December 2021
  • 2022

    • January 2022
    • February 2022
    • March 2022
    • April 2022
    • May 2022
    • June 2022
    • July 2022
    • August 2022
    • September 2022
    • October 2022
    • November 2022
    • December 2022
  • 2023

    • January 2023
    • February 2023
    • March 2023
    • April 2023
    • May 2023
    • June 2023
    • July 2023
    • August 2023
    • September 2023
    • October 2023
    • November 2023
  • 2024

    • January 2024
    • February 2024
    • March 2024
    • April 2024
    • May 2024
    • June 2024
    • July 2024
    • August, 2024
    • September 2024
    • October 2024
    • November 2024
    • December 2024
  • 2025

    • January 2025
    • February 2025
    • March 2025
    • April 2025
    • May 2025
    • June 2025
    • July 2025
    • August 2025
    • September 2025
    • October 2025
    • November 2025

September 4, 2019

Notes for presentation on SRCSET and images in general

  • http://msuwebdesign.com/lectures/lecture14-images.html
  • http://msuwebdesign.com/lectures/lecture18-responsive-code.html#retina-images
  • https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
  • https://css-tricks.com/responsive-images-youre-just-changing-resolutions-use-srcset/

Simple retina with Imgix

<img srcset="
    @(heroImage.ImgixUrl())?w=440&auto=compress 1x,
     @(heroImage.ImgixUrl())?w=440&auto=compress&dpr=2 2x"
     src="@(heroImage.ImgixUrl())?w=440&auto=compress"
     alt="Sea Cuisine: Smart" />

Different crop with Imgix

<picture>
  <source media="(min-width: 64em)"
      srcset="
          @(image.ImgixUrl())?w=900&h=1200&auto=compress&fit=crop 1x,
          @(image.ImgixUrl())?w=900&h=1200&auto=compress&fit=crop&dpr=2 2x" />
  <source media="(min-width: 40em)"
      srcset="
          @(image.ImgixUrl())?w=900&h=1200&crop=entropy&auto=compress&fit=crop 1x,
          @(image.ImgixUrl())?w=900&h=1200&crop=entropy&auto=compress&fit=crop&dpr=2 2x" />
  <source srcset="
          @(image.ImgixUrl())?w=742&h=506&auto=compress&fit=crop&crop=entropy 1x,
          @(image.ImgixUrl())?w=742&h=506&auto=compress&fit=crop&crop=entropy&dpr=2 2x" />
  <img src="@(image.ImgixUrl())?w=900&h=1200&&fit=crop" alt="@image.Alt" />
</picture>

Marlin Network Hubspot images

<picture>
  <source media="(min-width: 375px) and (max-width: 542px)" :srcset="ctaData.medium_rectangle.url">
  <source media="(min-width: 543px) and (max-width: 921px)" :srcset="ctaData.mobile_leaderboard.url">
  <source media="(min-width: 922px) and (max-width: 1288px)" :srcset="ctaData.leaderboard.url">
  <source media="(min-width: 1289px)" :srcset="ctaData.billboard.url">
  <img :src="ctaData.billboard.url">
</picture>

Retina new tap site

<img
  :srcset="itemData.data.listing_image.url + ', ' + itemData.data.listing_image.retina.url + ' 2x'"
  :src="itemData.data.listing_image.url"
  :alt="itemData.data.listing_image.alt"
>

Reviewing M's BSH style fix work

  • made small change

TAP, finishing home page block, doing a bit of accessibility work.

  • Need to think about landmarks EARLIER. hard to change later on.

Lupe meeting on client feature request. Need explanations on most.

  • Added some to the roadmap

JMS analytics stuff again

  • final decision was to make label setable, with fallback to button text
  • finalizing for launch, but more tasks later

Lupe, working on prototype

  • added my new type scale, moved meta to top under title
  • trying (vue-filter-date-format)[https://www.npmjs.com/package/vue-filter-date-format]
  • better! (nuxt date functions module)[https://github.com/nuxt-community/date-fns-module]