Skip to content

Commit

Permalink
fix: change empty image to use data-uri to fix ie 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
frederickfogerty committed Jun 27, 2018
1 parent f3bc7ad commit 5c93b3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/react-imgix.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import PropTypes from "prop-types";
import processImage from "./support.js";

// Best way to include an img with an empty src https://stackoverflow.com/a/5775621/515634 and https://stackoverflow.com/a/19126281/515634
const EMPTY_IMAGE_SRC = "//:0";
// Using '//:0' doesn't work in IE 11, but using a data-uri works.
const EMPTY_IMAGE_SRC =
"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";

const roundToNearest = (size, precision) =>
precision * Math.ceil(size / precision);
Expand Down

0 comments on commit 5c93b3a

Please sign in to comment.