Code Monkey home page Code Monkey logo

wp-tevko-responsive-images's Introduction

wp-tevko-responsive-images's People

Contributors

barryceelen avatar chriscoyier avatar kingkool68 avatar mattbagwell avatar micahmills avatar tevko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-tevko-responsive-images's Issues

165 - Undefined index: sizes

I realized something is messed up on my server to cause the absence of 'sizes' coming from wp_get_attachment_metadata ($id ); but either way, I'm getting this error:

NOTICE: wp-content/plugins/ricg-responsive-images/wp-tevko-responsive-images.php:165 - Undefined index: sizes

Would it be possible to change your line 165 to:

$img_sizes = isset($img_meta['sizes']) ? $img_meta['sizes'] : array();

Since 'full' is immediately added and the next loop runs through available sizes set, this wouldn't be too big of a hit to the whole system - only help to pad a a potential error from dirty data.

Thanks in advance for your consideration.

srcset question

@chriscoyier , I put together a pen http://codepen.io/tevko/pen/tlFBJ in an effort to understand the srcset syntax. From what I understand, this code is telling the browser that it has a full width image (100vw) and three possible sizes to choose from. It's also letting the browser know that it has three breakpoints as well.

Here's where I'm having difficulties.

1st up, (and I don't know if this is picturefill, the browser, or me causing this problem), the browser almost always loads 2 images on page load. first it loads the largest image, then it loads the correct one as defined by the srcset syntax. Relevant image:

Image ofscreenshot

2nd, lets define a use case in which an iphone 5s, 6, 6plus, 9000 etc. is loading a page, but they have a poor network connection. Where it would make sense to serve the user a lower quality image, the srcset syntax will force the browser to serve the user an image that works best with their screen resolution. It seems that srcset doesn't have a use case for high dpi screens with poor network connections. Am I understanding this correctly?

srcset

One of the primary reasons to use <picture> is having entirely different images being swapped out depending on the circumstances (art direction).

In the case of this plugin, the images are auto-generated re-sizings, which is a better fit for srcset.

http://codepen.io/anon/pen/eIcKz

https://twitter.com/yoavweiss/status/478648919917068288

http://scottjehl.github.io/picturefill/

It's a little weird to me still, because obviously picture CAN be used for this, and you CAN do art direction with srcset as well, sooooo. ¯_(ツ)_/¯

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.