diff --git a/lib/plugins/tag/img.js b/lib/plugins/tag/img.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/tag/img.js
+++ b/lib/plugins/tag/img.js
@@ -37,14 +37,10 @@ module.exports = ctx => {
     let src;
 
     // Find image URL and class name
-    for (let i = 0, len = args.length; i < len; i++) {
-      const item = args[i];
-
+    while (args.length > 0) {
+      const item = args.shift();
       if (rUrl.test(item) || item[0] === '/') {
         src = makeUrl(item);
-
-        // Delete image URL and class name from arguments
-        args = args.slice(i + 1);
         break;
       } else {
         classes.push(item);
Changed not to use Array#slice()