"An error has occurred: Could not decode image: 'rect851.png'" error in new extension I just developed.

234 views
Skip to first unread message

Rishabh Sharma

unread,
Sep 20, 2021, 7:39:39 PM9/20/21
to Chromium Extensions
Good evening everyone, 
I produced my first chrome extension a little while back, and it was finally accepted by the Google Web Store, and is now public. However, if I download it, the following error message pops up, saying "An error has occurred: Could not decode image: 'rect851.png' ". rect851.png is a image I made for the logo using Inkscape, and I wrote it into the manifest.json file as so: 
"icons": {
        "16": "rect851.png",
        "48": "rect851.png",
        "128": "rect851.png"
    },
If anyone wants to try and see if it works on their device as well, the link is right here.
I'll greatly appreciate any help on this issue. 
Thank you and have a great day!
Screenshot (62).png

Deco

unread,
Sep 20, 2021, 8:31:44 PM9/20/21
to Rishabh Sharma, Chromium Extensions
This fails mainly due to picture assets being too big in its file size. Either compress or crop the icons to reduce its file size and reupload the package.

Thanks,
Deco

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/4404de21-64c8-40bf-9855-4e386c641d1dn%40chromium.org.

Rishabh Sharma

unread,
Sep 20, 2021, 11:08:11 PM9/20/21
to Chromium Extensions, decklin...@gmail.com, Chromium Extensions, Rishabh Sharma
What file size is suitable for chrome extensions? And where can I go to compress the files? Thank you so much. 

hrg...@gmail.com

unread,
Sep 21, 2021, 2:04:51 AM9/21/21
to Chromium Extensions, rishabh2...@gmail.com, decklin...@gmail.com, Chromium Extensions
The purpose of the different icon sizes is to provide different image files, each with different dimensions, so that the browser can choose the appropriate image file for the corresponding dimensions it needs to render.

What you are doing is to provide the same image file for all sizes. This is useless.

Also, the icon images must have a 1:1 aspect ratio, but your image is 2121x2047 pixels. i.e. it not only doesn't have the correct aspect ratio, but it's also absurdly huge.

Create a 128x128 version of that image file and then include it in the manifest like this:
"icons": {
    "128": "icon128.png"
},

The browser will resize the image as needed. There's no need to specify it more than once, unless the automatic resize performed by the browser doesn't look good. If that's the case, then you can also provide smaller versions of the same icon.

md monir

unread,
Sep 21, 2021, 3:29:46 PM9/21/21
to hrg...@gmail.com, GoogleWorkspaceAf...@google.com, Chromium Extensions, rishabh2...@gmail.com, decklin...@gmail.com
>>>> <https://chrome.google.com/webstore/detail/yourspace/hbnjcjicdodldbfjcplllfdimjoocjmk>
>>>> .
>>>> I'll greatly appreciate any help on this issue.
>>>> Thank you and have a great day!
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Chromium Extensions" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to chromium-extens...@chromium.org.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/4404de21-64c8-40bf-9855-4e386c641d1dn%40chromium.org
>>>>
>>>> <https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/4404de21-64c8-40bf-9855-4e386c641d1dn%40chromium.org?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Chromium Extensions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chromium-extens...@chromium.org.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/7d6a5f1f-0eea-4c7b-8791-ddb81822210dn%40chromium.org.
>
Reply all
Reply to author
Forward
0 new messages