Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Thinking about responsive images

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #45663
    alexmccabe
    Participant

    I know this topic is hotly debated and all the solutions so far are hacks, and this is just another one of them.

    What if we manually create the images at the correct sizes for 1x, 2x and 3x (much work I know, but you can batch process) then they get their own folders in file structure.

    img

    — img_1x

    — img_2x

    — img_3x

    Then using a little piece of JS to inject into the <img> tag the correct folder name based on current resolution.

    I know this is a hack, but I don’t know what to suggest on it really. For those that have JS turned off the default is 1x but the images are resized.

    How do people feel about this?

    #139371
    CodeGraphics
    Participant

    Just use media query instead of js.

    #139374
    Paulie_D
    Member

    https://css-tricks.com/which-responsive-images-solution-should-you-use/

    https://css-tricks.com/on-responsive-images/

    >Just use media query instead of js.

    AFAIK, that won’t work for inline (i.e. content) images…only backgrounds?

    #139378
    Senff
    Participant

    http://daverupert.com/2013/06/ughck-images/

    Or, in short: “we still haven’t found a proper solution to this problem“.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.