Coder Social home page Coder Social logo

keysight-eggplant / image-checker Goto Github PK

View Code? Open in Web Editor NEW
15.0 9.0 4.0 341 KB

Provides image optimisation information within the browser

License: Apache License 2.0

HTML 8.55% CSS 11.04% JavaScript 80.40%
chrome-extension overlays image-analysis performance

image-checker's Introduction

NCC Image Checker - Chrome Extension

Build Status

Provides image optimisation information within the browser. The quality of layout for the information presented is strongly linked to markdown building techniques used.

Install

Download from the Chrome Extension Store or

  1. Clone the repo
  2. Open Chrome Extensions
  3. On the top right, check the checkbox for 'Developer mode'
  4. Click 'Load unpacked extension...'
  5. Select the directory where you have cloned this repo

Current limitations

  1. overlay of background images where the element is positioned with negative values or via tranform will display as if the values were positive; why? the javascript api returns absolute values
  2. overlay of carousel images will display for covered images as well
  3. overlapping overlays hide each other
  4. file size for some cross origin images is not available (depends of support of performanceEntry)
  5. sprites are not bad practice ... yet this tool flags them red, we don't handle them at all

image-checker's People

Contributors

pixelizedpeanut avatar simonhearne avatar tabanliviu avatar

Stargazers

 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

image-checker's Issues

Tooltip text takes too long to appear

For the average user, the tooltips on small images take so long to display that they will have moved their cursor off the image. Can we override the default behaviour to display the tooltip quicker?

Image size reported as too small, but it's not

I don't know if it is the same issue as #29, but here's an example where the overlay tells me the image is too small, while it's not.

Here: https://nicolas-hoizey.com/2017/01/how-much-data-should-my-service-worker-put-upfront-in-the-offline-cache.html#webmention-419040

image

$('#webmention-419040 > article > div.webmention__source > a.u-url > img').currentSrc tells me the image is https://res.cloudinary.com/nho/image/fetch/c_fill,f_auto,q_auto,w_600,h_400/http://image.thum.io/get/width/1200/crop/800/noanimate/http://www.webhostingreviewsbynerds.com/web-development-reading-list-168-preload-with-webpack-a-guide-to-security-headers-and-service-worker-fallacies/

It is 600 pixels wide, and the CSS size in the page is 298 pixels, so on my 2x screen (MacBook Retina), it should be almost perfect.

Vertical image alignment is out on msn.com when resized

Given I am on the page http://www.msn.com/en-gb/sport/football/manchester-city-sign-benjamin-mendy-for-world-record-fee-as-summer-spending-soars-past-%C2%A3200million/ar-AAoKaN6?li=BBoPWjP
And I turn on the image checker
Then I expect the image overlays to map correctly to the underlying images
When I resize to smaller widths
Then I expect the overlays to still map correctly to the underlying images

For widths smaller than 1268, image overlays no longer align with the page images

Colour scale for overlays

It would great to have a colour scale to refer to (perhaps within the flyout?). Red and green are pretty obvious but blue is less so.

Issue with responsive images and DPR on mobile

When responsive images are used with srcset, it looks as though images that are the right size are highlighted in blue (too small) and images that are too big are highlighted in green (OK) when emulating a mobile device with a high DPR in Devtools. I think this might be to do with using naturalWidth for the image element, rather than looking to naturalWidth of currentSrc - demo page here: https://www.alexrp.co.uk/nl/testresponse.html

Treatment of SVGs

SVGs are being higlighted in red when they should perhaps be excluded?
imagecheckersvg

Allow scrolling in the overlays

We currently hide text on overlays which don't meet minimum width & height values. This won't always work as text size can change by browser / site / accessibility settings, leading to overflow:
image
Instead of a minimum height, we should enable scrolling within the overlay.

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.