When you upload an image in the URL bar when creating a post, where does it go? Are they hosted on the respective Instance of the community?

  • majorswitcher@lemmyfly.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    yes, they are hosted on the server that is running the Lemmy instance. But every other instance that is linked to that instance will ‘scrape’ all posts incl images and store them on they’re own server. So posts and images are served from the instance you yourself are a member of

      • majorswitcher@lemmyfly.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        When I look on my server in the volumes/pictrs folder, there are a LOT of images that I recognize from my feed. They are not from posts posted to my server but belong to posts of communities that I have subscribed to

        • Geronimo Wenja@agora.nop.chat
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Are they thumbnails? If not, perhaps this is configurable… I’ll check out my own images folder and see if it’s pulling them in, but it definitely shows the remote url for images when I’m viewing them on my instance.

          • majorswitcher@lemmyfly.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            no, a random image I just now check was 3.3mb even. But you’re right, the image source does point to the origins server location… Then why are all those images stored on the server ?

            • Geronimo Wenja@agora.nop.chat
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              1 year ago

              OK, I’ve just realised something new - images pulled from websites as thumbnails are uploaded to the server and appear to be basically full sized, i.e.:

              https://agora.nop.chat/pictrs/image/59cfdd9c-2f69-4e8d-8afc-6fbc0c1cca87.jpeg

              This image is on my server, but it’s just pulled from the website as a thumbnail. This doesn’t seem to be super consistent in how it’s handled - I’m continuing to look at what’s causing it and why it doesn’t seem to happen all the time.

              EDIT: Seems like there’s more on there than I expected. Gonna continue digging.

  • Geronimo Wenja@agora.nop.chat
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    My understanding is that images don’t federate by default and you’ll load the image from whichever server it was uploaded to initially. Uploading an image here in the comment certainly does that:

    This post that shows in my instance loads it’s image from feddit.uk, even when it shows on my own instance rather than on this URL:

    https://feddit.uk/post/5813

    Looking at the federation docs, I’m pretty confident that a link to the image is the only thing going through. If someone uploads that on the server directly, that’ll be a link to that server, but it may be a link to Imgur or something too.

  • dog@yiffit.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    the docs don’t explicitly specify but you can see in the image url that they do end up on the instance you upload to

      • majorswitcher@lemmyfly.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        yes. running a server costs money. I have lemmyfly.org running just 2 days now on digitalocean using a cheap 1GB ram, 25GB diskspace and 1000GB bandwidth for $7,- a month. Storing images on the server will eventually take up all space and bandwidth meaning you have to upscale -> pay more.

        Using a different location for storing images and/ or videos is best to offload the instance !

  • pimeys@lemmy.nauk.io
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    If you run the normal Ansible setup, there’s one docker container running pictrs that’s going to handle the image uploads. By default, it stores it into a volume that comes from the server’s filesystem. So when you upload an image, it gets stored to the server’s file system with the default settings.

    Pictrs supports object storage, and you can get it to store the images to any S3 compatible storage.

      • pimeys@lemmy.nauk.io
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Btw, if somebody here makes an instance with pictrs sending data to S3, it would be really cool if you would document it and write a guide how to enable it with a common Ansible deployment. It seems that the docker image doesn’t take any environment variables, or at least there is no documented way how to turn on the object storage using the pictrs docker image. Maybe it’s not implemented yet, and somebody needs to fork the docker image…

        • tjr@innernet.link
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          I will update this thread if/when I find out more information regarding this.

      • pimeys@lemmy.nauk.io
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        If you tend to upload images/memes etc., yes, it’s a good idea. And very cheap (read: free) if you go with Cloudflare R2…