Udacity - Responsive Images

image๋Š” web์—์„œ ์•ฝ 62% ์ฐจ์ง€ํ•œ๋‹ค. ์ด๋ฏธ์ง€์˜ ์‚ฌ์ด์ฆˆ๋Š” ๋งค์šฐ ๋‹ค์–‘ํ•˜๋‹ค. ๊ธฐ๊ณ„๊ฐ€ ๋‹ค์–‘ํ•œ๋งŒํผ ์ด๋ฏธ์ง€ ํฌ๊ธฐ๋„ ๊ฑฐ๊ฐ€์— ๋งž์ถฐ์ ธ์•ผํ•œ๋‹ค.

"images consume more than 60% of the bytes that cross the web." This isn't strictly true: images on average consume more than 60% of the bytes to open a web page, but most of the bytes that "cross the web" are for video.

Units, Formats, Environments

Total bits = pixels X bits per pixel less pixels * better compression = less bytes

์–ด๋–ป๊ฒŒ ํŒŒ์ผํฌ๊ธฐ๊ฐ€ ๋Š˜์–ด๋‚ ๋•Œ ํ€„๋ฆฌํ‹ฐ๋ฅผ ์œ ์ง€ํ• ๊นŒ?

ํ™”๋ฉด์ด ์ค„์–ด๋“ค๋•Œ ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๋ฅผwidth: 100%๋กœ ํ•ด์คŒ์œผ๋กœ์จ ๊ฐ€๋ ค์ง€๋Š”๊ฒƒ์„ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค. ํ•˜์ง€๋งŒ ํ™”๋ฉดํฌ๊ธฐ๋ฅผ ํ‚ค์šฐ๋ฉด ์ด๋ฏธ์ง€์˜ ํ€„๋ฆฌํ‹ฐ๊ฐ€ ๊นจ์ง„๋‹ค.

max-width: 100% ๋ฅผ ํ•˜๋ฉด natural width๋งŒํผ ์ปค์ง€๊ณ  ๊ทธ์ด์ƒ์€ ์•ˆ์ปค์ง„๋‹ค.

  • calc() CSS function can be used anywhere a , , , , , or is required.

    width: calc(100% - 80px);
    # 100% ๋„ˆ๋น„์—์„œ 80%๋งŒํผ ๋บ€ ๋„ˆ๋น„

    ์—ฐ์‚ฐ์‹œ ๋ฐ˜๋“œ์‹œ ์‚ฌ์น™์—ฐ์‚ฐ +,-๊ธฐํ˜ธ ์–‘์ชฝ์—๋Š” ๊ณต๋ฐฑ์„ ์‚ฝ์ž…ํ•ด์•ผํ•œ๋‹ค.

Landscape and Portrait

: ํ™”๋ฉด์„ ๊ฐ€๋กœ๋กœ ํ–ˆ์„๋•Œ๋Š” ๊ดœ์ฐฎ์€๋ฐ ์„ธ๋กœ๋กœ ํ–ˆ์„๋•Œ ์ด๋ฏธ์ง€๊ฐ€ ๊ฐ€๋ ค์ง€๋Š” ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด๋‹ค.

Did you notice how setting both the height and the width to 100vmax or 100vmin changes the image's aspect ratio? It'll compress your images to squares, so be careful if you want to maintain a different aspect ratio! vmin๊ณผ vmax๋ฅผ ์ด์šฉํ•ด์„œ ํ™”๋ฉดํฌ๊ธฐ์— ๋งž๊ฒŒ ์ด๋ฏธ์ง€๊ฐ€ ๋ฐ”๋€Œ๋„๋ก ํ•  ์ˆ˜ ์žˆ๋‹ค.

Raster and Vertor

  • Raster image(png,jpeg)๋Š” ์ผ๋ฐ˜์ ์ธ ์นด๋ฉ”๋ผ, ์Šค์บ๋„ˆ๋กœ ์ฐ์€ ์ด๋ฏธ์ง€์ด๋ฉฐ, Vector ์ด๋ฏธ์ง€(svg)๋Š” ๋กœ๊ณ ์™€๊ฐ™์ด ์ผ๋Ÿฌ์ŠคํŠธ๋ ˆ์ดํŠธ๋กœ ๋งŒ๋“  ์ด๋ฏธ์ง€์ด๋‹ค.

    ๋‘๊ฐœ์˜ ์ด๋ฏธ์ง€๋ฅผ ๋น„๊ตํ•ด๋ดค์„๋•Œ png๋Š” ํ™”๋ฉด์˜ ํฌ๊ธฐ๋ฅผ ํ‚ค์šฐ๋ฉด ์ด๋ฏธ์ง€๊ฐ€ ์•ฝ๊ฐ„ ๊นจ์ง€๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.svg๋Š” ์–ด๋Š ์‚ฌ์ด์ฆˆ์—์„œ๋‚˜ perfectํ•˜๋‹ค. jpeg๋ณด๋‹ค svg๊ฐ€ ์‚ฌ์ด์ฆˆ๋„ ๋” ์ž‘์€ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. png๋Š” ์ตœ๋Œ€ํ•œ ํ”ผํ•˜๊ณ  , svg๋ฅผ ์ตœ๋Œ€ํ•œ ์‚ฌ์šฉํ•ด๋ผ.

Grunt & ImageMagick & ImageOptim

์ด๋ฏธ์ง€ํฌ๊ธฐ์™€ ํƒ€์ž…์„ ๋‹ค์–‘ํ™”ํ•ด์ฃผ๋ฉฐ, ์ด๋ฏธ์ง€๋กœ๋”ฉ์„ ๋น ๋ฅด๊ฒŒ ํ•ด์ค€๋‹ค. http://gruntjs.com/ https://imageoptim.com/mac http://www.imagemagick.org/script/index.php

Grunt๊ฐ€ ์™„์ „์ข‹์•„! grunt๋กœ pagespeed๋„ ํ™•์ธํ•ด๋ณผ ์ˆ˜ ์žˆ๋‹ค.

Html figure tag

:figure์š”์†Œ๋Š” ์ผ๋Ÿฌ์ŠคํŠธ, ๋‹ค์ด์–ด๊ทธ๋žจ, ์‚ฌ์ง„, ์ฝ”๋“œ๋“ฑ์— ์ฃผ์„์„ ๋‹ค๋Š” ์šฉ๋„๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

  • ์ด ์š”์†Œ๊ฐ€ ์ œ๊ฑฐ ๋˜๋”๋ผ๋„ ๋ฌธ์„œ์˜ ์ฃผ๋œ ํ๋ฆ„์—๋Š” ํฐ ์˜ํ–ฅ์„ ๋ฏธ์น˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

  • figure์š”์†Œ๋Š” figcaption ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ * figure์š”์†Œ์•ˆ์—์„œ ๋งจ์•ž์ด๋‚˜ ๋งจ ๋งˆ์ง€๋ง‰์—๋งŒ ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹จ, figcaption์š”์†Œ๊ฐ€ ํ•„์ˆ˜๋Š” ์•„๋‹™๋‹ˆ๋‹ค.

Images with Markup

Text

ํ…์ŠคํŠธ๋ฅผ ์‚ฌ์ง„์œ„์— ์จ์„œ jpeg๋กœ ์ €์žฅํ•œ๋‹ค๋ฉด, ํ™”๋ฉด์˜ ํฌ๊ธฐ๊ฐ€ ๋ฐ”๋€”๋•Œ ๊ธ€์ž๊ฐ€ ๊นจ์ง€๊ฒŒ๋œ๋‹ค. ํ•˜์ง€๋งŒ ํ…์ŠคํŠธ๋ฅผ ์ด๋ฏธ์ง€์™€ ๋ณ„๋„๋กœ ์“ฐ๊ฒŒ๋œ๋‹ค๋ฉด ๊นจ์ง€์ง€๋„ ์•Š๊ณ , ์Šคํฌ๋กค์„ํ•ด์„œ ๊ธ์–ด ์˜ฌ ์ˆ˜๋„ ์žˆ๋‹ค. ํŒŒ์ผ ํฌ๊ธฐ๋˜ํ•œ ์ค„์–ด๋“ ๋‹ค.(CSS๋ฅผ ํ†ตํ•ด์„œ!) ํ•˜์ง€๋งŒ CSS ํšจ๊ณผ๋„ load time์„ ์‹ ๊ฒฝ์จ์•ผํ•œ๋‹ค. ๋ชจ๋ฐ”์ผ์—์„œ ๋กœ๋”ฉ์„ ํ•  ๋•Œ ์˜ค๋ž˜๊ฑธ๋ฆด ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์—.

https://www.smashingmagazine.com/2013/04/build-fast-loading-mobile-website/

CSS Background images

ํ™”๋ฉดํฌ๊ธฐ์— ๋”ฐ๋ผ์„œ ์ด๋ฏธ์ง€๋ฅผ ๋‹ค์šด๋ฐ›๋„๋ก ํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

background-size: cover;
background-size: contain;
  • cover๋กœ ์ง€์ •ํ•˜๋ฉด ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ๊ฐ€๋กœ, ์„ธ๋กœ ๊ธธ์ด ๋ชจ๋‘ ์—˜๋ฆฌ๋จผํŠธ๋ณด๋‹ค ํฌ๋‹ค๋ผ๋Š” ์กฐ๊ฑดํ•˜์— ๊ฐ€๋Šฅํ•œํ•œ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€๋ฅผ ์ž‘๊ฒŒ ์กฐ์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ€๋กœ/์„ธ๋กœ ๋น„์œจ์€ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๋Š” ์—˜๋ฆฌ๋จผํŠธ์˜ ํฌ๊ธฐ๋ณด๋‹ค ํ•ญ์ƒ ํฌ๊ฑฐ๋‚˜ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • contain์œผ๋กœ ์ง€์ •ํ•˜๋ฉด ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ๊ฐ€๋กœ, ์„ธ๋กœ ๊ธธ์ด ๋ชจ๋‘ ์—˜๋ฆฌ๋จผํŠธ ์•ˆ์— ๋“ค์–ด์˜จ๋‹ค๋ผ๋Š” ์กฐ๊ฑดํ•˜์— ๊ฐ€๋Šฅํ•œํ•œ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€๋ฅผ ํฌ๊ฒŒ ์กฐ์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ€๋กœ/์„ธ๋กœ ๋น„์œจ์€ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ฐฐ๊ฒฝ ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๋Š” ์—˜๋ฆฌ๋จผํŠธ์˜ ํฌ๊ธฐ๋ณด๋‹ค ํ•ญ์ƒ ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Inline vs External images

: ์‹ค์ œ๋กœ ํ•ด๋ณด๊ณ  ๋” ๋น ๋ฅธ๊ฒƒ์„ ์„ ํƒํ•ด์•ผํ•œ๋‹ค.

Full Responsiveness

Srcset & Sizes

<img src="small.jpg"
     srcset="large.jpg 1024w, medium.jpg 640w, small.jpg 320w"
     sizes="(min-width: 36em) 33.3vw, 100vw"
     alt="A rad wolf">

<img> ํƒœ๊ทธ์— ์ƒˆ๋กœ srcset๊ณผ sizes ์†์„ฑ์ด ๋ง๋ถ™์—ˆ๋‹ค. ์—ฌ๊ธฐ ์˜ˆ์ œ์˜ srcset ์†์„ฑ์—์„œ๋Š” ๊ฐ๊ฐ ๊ฐ€๋กœํญ 1024px, 640px, 320px์ธ 3๊ฐœ์˜ ์ด๋ฏธ์ง€๋ฅผ ์‰ผํ‘œ๋กœ ๋ถ„๋ฆฌ๋œ ๋ฌธ์ž์—ด ํ˜•์‹์œผ๋กœ ์ ์—ˆ๋‹ค. ์ด๋Ÿด ๊ฒฝ์šฐ ๋ธŒ๋ผ์šฐ์ €(srcset์„ ์ง€์›ํ•˜๋Š” ๋ธŒ๋ผ์šฐ์ €)๋Š” ์ด ๊ฐ’์„ ์ฝ์–ด ํ˜„์žฌ์˜ ํ™”๋ฉด ์ƒํƒœ์— ๋งž๋Š” ์ ์ ˆํ•œ ์ด๋ฏธ์ง€๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๊ฒŒ ๋œ๋‹ค. sizes ์†์„ฑ๋„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, ์ด ์†์„ฑ์€ ๋ฏธ๋””์–ด์ฟผ๋ฆฌ์˜ ์ค‘๋‹จ์ (breakpoint) ๋ณ„๋กœ ํ•„์š”ํ•œ ์ด๋ฏธ์ง€์˜ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€๋กœ ์ œ๊ณตํ•จ์œผ๋กœ์จ ์—ญ์‹œ ๋ธŒ๋ผ์šฐ์ €๋กœ ํ•˜์—ฌ๊ธˆ ํ˜„์žฌ์˜ ์ƒํƒœ์— ๊ฐ€์žฅ ์ž˜ ๋งž๋Š” ์ด๋ฏธ์ง€๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๋Š”๋ฐ ๋„์›€์„ ์ฃผ๊ฒŒ ๋œ๋‹ค. ์œ„ ์˜ˆ์ œ์—์„œ๋Š” ๋ฏธ๋””์–ด์ฟผ๋ฆฌ์˜ ์ค‘๋‹จ์ ์œผ๋กœ ๊ฐ€๋กœํญ์ด 36em ์ด์ƒ์ธ ๊ฒฝ์šฐ์—๋Š” 33.3vw (โ€˜viewport widthโ€™๋ฅผ ์˜๋ฏธ)์˜ ์ด๋ฏธ์ง€๊ฐ€ ํ•„์š”ํ•จ์„ ๋ธŒ๋ผ์šฐ์ €์— ์•Œ๋ฆฌ๊ณ  ์žˆ์œผ๋ฉฐ ๋’ค์˜ 100vw๋Š” ๋””ํดํŠธ๊ฐ’์ด๋‹ค. ๋ฌผ๋ก  srcset๊ณผ sizes๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ๋ธŒ๋ผ์šฐ์ €์—์„œ๋Š” ๊ธฐ์กด์˜ src ์†์„ฑ์ด ํด๋ฐฑ(fallback)์œผ๋กœ ์‚ฌ์šฉ๋œ๋‹ค.

srcset๊ณผ sizes ์†์„ฑ์„ ์‚ฌ์šฉํ•˜๋ฉด ์•ž์—์„œ ์ œ๊ธฐํ•œ ๋„ค ๊ฐ€์ง€ ๋ฌธ์ œ๋“ค ์ค‘ ์ ์–ด๋„ ์ฒ˜์Œ ๋‘ ๊ฐ€์ง€ ๋ฌธ์ œ๋Š” ์†์‰ฝ๊ฒŒ ํ•ด๊ฒฐ๋œ๋‹ค. ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ํ™”๋ฉด ํฌ๊ธฐ์— ๋งž์ถฐ ์ ์ ˆํ•œ ์šฉ๋Ÿ‰์˜ ์ด๋ฏธ์ง€๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๊ณ  ๋˜ํ•œ ๊ณ ๋ฐ€์ง‘๋„ ๋””์Šคํ”Œ๋ ˆ์ด ํ™”๋ฉด์— ๋Œ€ํ•œ ๋Œ€์‘๋„ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ํŒ๋‹จํ•˜์—ฌ ๋Œ€์‘ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

srcset syntax

one using x to differentiate between device pixel ratios (DPR), and the other using w to describe the image's width.

  • Reacting to Device Pixel Ration

    <img src="image_2x.jpg" srcset="image_2x.jpg 2x, image_1x.jpg 1x" alt="a cool image">

    1x represents 1x displays and 2x represents displays with twice the pixel density, like Apple's Retina display

  • Reacting to Image Width

    <img src="image_200.jpg" srcset="image_200.jpg 200w, image_100.jpg 100w" alt="a cool image">

    widthDescriptor is measured in pixels and must be an integer followed by a w.

sizes Syntax

sizes attribute to the image with a media query and a vw value.

  • <img  src="images/great_pic_800.jpg"
        sizes="(max-width: 400px) 100vw, (min-width: 401px) 50vw"
        srcset="images/great_pic_400.jpg 400w, images/great_pic_800.jpg 800w"
        alt="great picture">

    sizes consists of comma separated mediaQuery width pairs. sizes tells the browser early in the load process that the image will be displayed at some width when the mediaQuery is hit.

    In fact, if sizes is missing, the browser defaults sizes to 100vw, meaning that it expects the image will display at the full viewport width.

Picture

srcset/sizes ์†์„ฑ๋งŒ์œผ๋กœ ํ•ด๊ฒฐํ•  ์ˆ˜ ์—†๋Š” ๋ฌธ์ œ๋“ค, ์˜ˆ์ปจ๋Œ€ ์•„ํŠธ ๋””๋ ‰์…˜ ์ฒ˜๋ฆฌ๋‚˜ ์—ฌ๋Ÿฌ ์ด๋ฏธ์ง€ ํฌ๋งท ์ง€์› ๋“ฑ์€ <picture> ์—˜๋ฆฌ๋จผํŠธ๋กœ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค.

<picture>
  <source media="(min-width: 40em)" 
          srcset="big.jpg 1x, big-hd.jpg 2x">
  <source srcset="small.jpg 1x, small-hd.jpg 2x">
  <img src="fallback.jpg" alt="">
</picture>

์—˜๋ฆฌ๋จผํŠธ๋Š” ํ•˜์œ„ ์š”์†Œ๋กœ <source> ์—˜๋ฆฌ๋จผํŠธ๋ฅผ ๋‘์–ด ๊ฐ๊ฐ์˜ ์ด๋ฏธ์ง€ ์†Œ์Šค๋ฅผ ์ฒ˜๋ฆฌํ•œ๋‹ค. ์œ„ ์˜ˆ์ œ์—์„œ๋Š” ๋ฏธ๋””์–ด์ฟผ๋ฆฌ๋กœ min-width๊ฐ’์ด 40em ์ด์ƒ์ธ ๊ฒฝ์šฐ๋Š” big.jpg ํŒŒ์ผ์„, ๊ทธ ์ดํ•˜์ธ ๊ฒฝ์šฐ๋Š” small.jpg ํŒŒ์ผ์„ ๊ฐ๊ฐ ๋กœ๋“œํ•˜๊ฒŒ๋” ์„ค์ •๋˜์–ด ์žˆ๋‹ค. ์ด ๋•Œ ๊ฐ๊ฐ์˜ <source> ์—˜๋ฆฌ๋จผํŠธ ๋‚ด์—๋Š” srcset ์†์„ฑ์„ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ฐ€์ง‘๋„(์—ฌ๊ธฐ์„œ๋Š” 1x์™€ 2x๋ฅผ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ, 2x๋Š” 196 DPI ์ด์ƒ์„ ์ผ์ปซ๋Š”๋‹ค)์— ๋”ฐ๋ผ ๊ฐ๊ธฐ ๋‹ค๋ฅธ ์ด๋ฏธ์ง€ ํŒŒ์ผ์„ ๋กœ๋“œํ•˜๊ฒŒ๋” ์„ค์ •ํ•˜๋Š”๋ฐ, ์ด ๋ถ€๋ถ„์€ ์•ž์„œ์˜ <img> ํƒœ๊ทธ์— ๋ถ™์€ srcset ์†์„ฑ๊ณผ ๋™์ผํ•˜๋‹ค.

<picture>
  <source media="(min-width: 800px)"
          sizes="80vw"
          srcset="lighthouse-landscape-640.jpg 640w,
                  lighthouse-landscape-1280.jpg 1280w,
                  lighthouse-landscape-2560.jpg 2560w">
  <img src="lighthouse-160.jpg" alt="lighthouse"
       sizes="80vw"
       srcset="lighthouse-160.jpg 160w,
               lighthouse-320.jpg 320w,
               lighthouse-640.jpg 640w,
               lighthouse-1280.jpg 1280w">
</picture>

์ด <picture> ์—˜๋ฆฌ๋จผํŠธ๋ฅผ ์ด์šฉํ•˜๋ฉด ์•ž์„œ <img> ํƒœ๊ทธ์— ๋ถ™์—ฌ ์‚ฌ์šฉํ–ˆ๋˜ srcset/sizes ๋ฐฉ์‹๋ณด๋‹ค ์กฐ๊ธˆ ๋” ๋‹ค์–‘ํ•œ ์ฒ˜๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•ด ์ง„๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ์•„ํŠธ๋””๋ ‰์…˜(art direction) ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค. ์—ฌ๊ธฐ์„œ๋Š” ๋ฏธ๋””์–ด์ฟผ๋ฆฌ๋กœ width๊ฐ’์ด 800px ์ด์ƒ์ธ ๊ฒฝ์šฐ(lighthouse-landscape)์™€ ๊ทธ ์ดํ•˜์ธ ๊ฒฝ์šฐ(lighthouse) ๊ฐ๊ฐ ๋‹ค๋ฅธ ์ด๋ฏธ์ง€๋ฅผ ์‚ฌ์šฉํ•˜๋ฉฐ ๊ทธ ๊ฒฐ๊ณผ ์ข์€ ํญ์˜ ํ™”๋ฉด์—์„œ๋Š” ๋„“์€ ํญ๊ณผ๋Š” ๋‹ค๋ฅธ ๋ชจ์–‘์˜ ์ด๋ฏธ์ง€๊ฐ€ ๋ณด์—ฌ์ง์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

<picture>
  <source type="image/webp" srcset="images/butterfly.webp">
  <img src="images/butterfly.jpg" alt="a butterfly">
</picture>

<picture> ์—˜๋ฆฌ๋จผํŠธ๋Š” ๋‹ค์–‘ํ•œ ์ด๋ฏธ์ง€ ํ˜•์‹์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐ๋„ ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ๋‹ค. ์•„๋ž˜ ์˜ˆ์ œ๋ฅผ ๋ณด๋ฉด webp๋ฅผ ์ง€์›ํ•˜๋Š” ๋ธŒ๋ผ์šฐ์ €์ธ ๊ฒฝ์šฐ jpg ํŒŒ์ผ์ด ์•„๋‹Œ webp ํŒŒ์ผ์„ ํ‘œ์‹œํ•˜๋„๋ก ํ•˜๊ณ  ์žˆ๋‹ค.

[์ฐธ์กฐํŽ˜์ด์ง€] http://www.usefulparadigm.com/2014/11/03/processing-images-on-responsive-web/

Last updated