I’m building a refugee community for a subreddit (or two) I used to moderate, and I’m trying to add an icon and I keep getting the error message “SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data”. I couldn’t find any documentation about the expected size of icons and banners, so I don’t know where to start.

Thanks!

  • freeskier@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Edit: Before trying this copy the original filename and paste it into a text editor. If this is the issue then this should be reported as a bug. Either no character verification is taking place before trying to encode it in json, or they are missing some characters to check.

    The image name probably contains a weird character that can’t be parsed. Try renaming the image to something simple like “my_image”.

  • n0mgooseOP
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Looks like icons are 600x600, based on what everyone elses icon was. Didn’t find it in the docs, but cutting my image down worked wonders. Thanks!

    • sunaurusMA
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Hey! The main limit at the moment is actually that all uploaded images should be smaller than 100kb. I assume that by resizing, you also cut down on the file size, and that is what solved the issue. Glad you got it working!

    • freeskier@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      When you cut the image down did you save as with a different name? I’ve had no issue uploading icons bigger than 600x600.

      • n0mgooseOP
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I did not change the file name, just resized it in paint and boom, it worked.