Right now, the only method I found is to click on the expando, then right click on the image and open it in a new tab. Is there a way to make it so I can just click it once? I can’t imagine any possible scenario where I’d want to see a large but not full size image.

I’m using the browser on my computer if that’s relevant.

Edit: I got it to work using the Stylus addon and:

.img-expanded:not(.banner, .avatar-overlay) {
    max-height: unset;
    max-width: 100vw;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    outline: auto;
    outline-color: black;
    z-index: 1;
}

I also made it outline any expandos with:

/*Note: Links are exactly the same except without bg-transparent, so using not(bg-transparent) instead will outline the links instead of the expandos. Also, they're outlined orange unless you change it, so you could take that off, give them all outlines, and you can tell which they are based on the color.*/
.thumbnail.rounded.overflow-hidden.d-inline-block.position-relative.p-0.border-0.bg-transparent {
    outline: auto;
}
  • _HR_@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    You could add .img-expanded { max-height: unset; } as a rule for your lemmy instance in the Stylus addon for browser. This will remove the height limiter for images.

    • Archpawn@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I tried that. It still seems to be limiting the width. How can I make it so it can stretch from one side of the screen to the other?

      • _HR_@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        This will allow maximum expansion, but will somewhat break display of the sidebar:

        .col-lg-9, .col-md-8 {
            width: unset;
        }
        
        .container-lg, .container-md, .container-sm, .container {
            max-width: unset;
        }
        
        .offset-sm-3 {
            margin-left: unset;
        }
        

        I’ve only tested with a few [email protected] posts, and couldn’t quickly find whether this would affect images in comments.

        • Archpawn@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 year ago

          Changing .img-expanded { max-height: unset; } to .img-expanded:not(.banner):not(.avatar-overlay) { max-height: unset; } Fixes the banner and Lemmy icon, since they’re listed as .img-expanded for some reason. I’m hoping to figure out how to make it overlay the image on top of the sidebar, or at least only push it away while the image is opened.

          How is this not a solved problem? Am I the only person who cares about seeing the image at a larger resolution?

          • _HR_@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 year ago

            Nice.

            How is this not a solved problem?

            Tradeoffs I’d imagine. Lemmy devs need to prioritize between lots of things that absolutely need to be addressed first (like the recent vulnerabilities), and as a result relatively “minor” issues like this gets stuck on the sidelines. In addition to that, “beauty is in the eye of beholder”, so spending development time on this stuff when it might not even be acceptable to people is… well, wasteful.

            That being said, the code is open source, so anyone can help and contribute improvements/fixes.

            Am I the only person who cares about seeing the image at a larger resolution?

            Definitely not. I didn’t quite realize just how much of a difference this would make, but now that I’ve added it to CSS overrides it does make a huge difference. Thanks for pointing it out.

            • Archpawn@lemmy.worldOP
              link
              fedilink
              English
              arrow-up
              4
              ·
              1 year ago

              It’s not just a Lemmy thing. Imgur has the same problem too, and the only reason it exists is for images.

              Anyway, I don’t think this fix is ideal, but I’m going to head to a CSS community to get it working properly.

              • Archpawn@lemmy.worldOP
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                I improved the fix and edited the post to show it. Now it doesn’t mess with the sidebar and leaves the margin on the left for everything but images. And I added something to outline expandos. I’m tired of accidentally opening links. I really wish they weren’t opened the same way, but that’s not something i can fix with CSS.

        • _HR_@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          For images inside comments (also can break sidebar):

          .md-div img { max-height: unset; }

    • Archpawn@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I was able to do this the first time, but I can’t figure out how to get back to the page to add styles to Stylus. I’m using Chrome. I noticed that some other extensions have extension options when you click on them, but Stylus doesn’t have that. It has Site settings and Open extension website, which look like they might be relevant but aren’t.

      • _HR_@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Clicking on the extension in the browser bar shows menu that can be used to access/create rules, but I’m using Firefox.

    • Archpawn@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I don’t want them expanded by default. I just want it so that when I click on the thumbnail, it fully expands. Also, apps are a phone thing, right? Fully expanded on my phone is even smaller than partially expanded on my computer.

  • kucuva@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    My trick is I usually change the position of the image element itself with absolute positioning, then I cal the width of the window and height, if the width > height, i put black bars with padding and background:black; if you put 100% width, the height is still not guaranteed if u have a long photo, same goes for the opposite. I just cal widths with JS b/c my css attempt was taking too long… lolol

    • Archpawn@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      That automatically expands the images. I don’t want them automatically expanded. I just want them to fully expand when you click on them. The default way to expand an image is click on the thumbnail, then it turns into a bigger thumbnail, then you middle click on that to open it in a new tab, then you move to the new tab. Or you click on it and have to unload the rest of the page. It would be nicer just to show it on the page and make it a single-step process.