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:
parent
638a4595c7
commit
b365272aa6
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue