Skip to content

Commit a709474

Browse files
committed
Add support for encoded image paths/urls.
1 parent 86dc741 commit a709474

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

responsively-lazy.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ var responsivelyLazy = typeof responsivelyLazy !== 'undefined' ? responsivelyLaz
185185
if (skipOption) {
186186
continue;
187187
}
188+
if ((optionImage.indexOf('%2F') !== -1 || optionImage.indexOf('%3F') !== -1) && optionImage.indexOf('/') === -1 && optionImage.indexOf('?') === -1) {// path is encoded
189+
optionImage = decodeURIComponent(optionImage);
190+
}
188191
options.push([optionImage, optionWidth]);
189192
if (maxOptionWidth < optionWidth) {
190193
maxOptionWidth = optionWidth;

responsively-lazy.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)