Frequently when uploading an image I get the following error:

SyntaxError: Unexpected token ‘R’, “Request er”… is not valid JSON

Usually when I get this error, I just try again, and it often works fine. Tonight I got this error 15+ times uploading two images.

I realize the “SyntaxError” is really just hiding the real error. Does anyone know what this error is? Is there a way I can see the actual error?

Also of note, I tend to upload full size (read large) images.

  • rustling_leaves@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    11 months ago

    I think there is a 20 MB image size limit

    One thing you can try is open up dev console, restart the page, then try the image upload, and look at the request in the network tab, you may see the full error image there

    • b9999998@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      11 months ago

      Also 4096x4096 max dimensions.
      For the sake of readers, I usually also compress the images down. TBH, I suspect a very large % of readers here are simply satisfied with smaller images/smaller size. As on Reddit, I also suspect most users are on mobile platforms/devices so very large uncompressed images do not add any addit!ional benefit. This coming from me as a poster that used to like to view/zoom into stuff on 4K monitors. It always surprises me that low quality images tend to get a lot more upvotes…

      • yeuxprives@lemmynsfw.comOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 months ago

        Ah, the dimensions are most likely the problem. I use high resolution monitors, and have always disliked the smaller images, particularly when they get upscaled. May have to do some A/B testing on that point.

        • b9999998@lemmynsfw.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          11 months ago

          I use Lensdump and imgchest as alternative hosting sites for images/sets where I want to preserve large images like the ones for !hegre@lemmynsfw.com , but find that sizing down to 4096 limit is still a good tradeoff. TBH, afaik, nobody here on LemmyNSFW that I know has ever complimented positively about the quality of uhd images… (Btw, I used to mod https://old.reddit.com/r/UHDnsfw/ so I do appreciate the very large ones but its also a very niche audience in these days of mobile devices…)

    • yeuxprives@lemmynsfw.comOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 months ago

      Good point. Particularly when it is one I sometimes make to clients. And me not even thinking of it. Yikes.