plugins: (image) support :size suffix

Some images URL (such as Twitter hosting site twimg.com) are suffixed
with :size where size can be small, medium or large.
This commit is contained in:
Vivien Didelot 2015-01-14 10:36:03 -05:00
commit b365272aa6
2 changed files with 4 additions and 2 deletions

View file

@ -257,7 +257,7 @@ plugins.factory('userPlugins', function() {
var embed = false;
// Check the get parameters as well, they might contain an image to load
var segments = url.split(/[?&]/).forEach(function(param) {
if (param.match(/\.(png|gif|jpg|jpeg)$/i)) {
if (param.match(/\.(png|gif|jpg|jpeg)(:(small|medium|large))?$/i)) {
embed = true;
}
});