diff --git a/matrixpack.sh b/matrixpack.sh
index 9c4f43e0c3f99d8b4c4bd806a2335751eb06c17e..2b81610a5b4d3216ac6fd33eee6cb92bbeee9d54 100755
--- a/matrixpack.sh
+++ b/matrixpack.sh
@@ -120,6 +120,10 @@ do
           type="gif"
           opts=""
         fi
+
+        # Erase the extension of the image
+        sticker_name=$(echo "$f" | cut -f 1 -d '.')
+
         # Trim, resize and remove indexed palette from image
         echo -n "trimming and resizing"
         convert "$f" -bordercolor none -border 1 "$slug/tmp/$f.$type"
@@ -143,7 +147,7 @@ do
         height=$(identify -format "%h" "$slug/tmp/size"[0])> /dev/null
 
         # Appending to json
-        echo -n "{\"body\":\"$f\",\"info\":{\"mimetype\":\"image/$type\",\"h\":$height,\"w\":$width,\"thumbnail_url\":\"$mxc\"},\"msgtype\":\"m.sticker\",\"url\":\"$mxc\",\"id\":\"$packname-$f\"}" >> "$slug/$slug.json"
+        echo -n "{\"body\":\"$sticker_name\",\"info\":{\"mimetype\":\"image/$type\",\"h\":$height,\"w\":$width,\"thumbnail_url\":\"$mxc\"},\"msgtype\":\"m.sticker\",\"url\":\"$mxc\",\"id\":\"$packname-$sticker_name\"}" >> "$slug/$slug.json"
         first=","
         echo -e ". \033[92msuccess\033[0m!"
       fi