Loomio
Sun 28 Dec 2014 3:57PM

High resolution / full sized images for lightbox

DU Thomas Leister Public Seen by 157

Hi @all,

Since my first day on Diaspora I have wondered why images displayed in the lightbox are so small. They do not differ much from the in-stream version and sometimes it's hard to see the tiny parts of a picture.

To get a full-sized version of the image there is a little trick: You take the image URL and remove the "scaled_full" in front of the image filename, paste it in your address bar again and you get the original image file.

This trick is not well-known and I guess some users have difficulties to enlarge pictures.

My idea is to show a full-sized version (original version) of the image in the lightbox instead of the smaller scaled_full version. There is more than enough space to give images the space they need. We will keep having the scaled_full version in the stream as small footprint preview, but if you open the lightbox on that picture you will get the full version on your screen.

To prevent parts of the image being cut off due to small screen size, the lightbox will resize the full version to a size which fits the screen in width. This will happen dynamically and CSS-based.

There's a short screencast on my server to show my finished work: https://cloud.trashserver.net/public.php?service=files&t=1229224ef4da202a4c58160200008e8a

In my current code there is only a small border around the image. You can easily increase the border width if you want, but that's more detailed stuff we can discuss about later.

My updated code for Diaspora is finished so far. You can see the changes here: https://github.com/ThomasLeister/diaspora/compare/bigpics?expand=1

Let me know if you like the changes. If you do, we can easily merge my code to the Diaspora dev branch and have full-sized images in the next Diaspora* release :)

Update: Pull request on GitHib: https://github.com/diaspora/diaspora/pull/5500

Update2: Video on YouTube: https://www.youtube.com/watch?v=YMsm9MVl1T0

MB

Marcelo Briones
Disagree
Sun 4 Jan 2015 9:09PM

Resources in pods are limited.

TR

[email protected]
Agree
Tue 6 Jan 2015 4:39PM

I would prefer it to be an option to turn on/off in case you are running a limited resource pod.

JR

Jason Robinson
Abstain
Fri 9 Jan 2015 8:26PM

Kind of improvement, but as said by a few, the "real" fix would be to give podmins better configuration control regarding image uploads. As a temporary thing this does improve usability eg better image quality for viewing images at cost for podmin.

PS

Pavithran S
Agree
Wed 14 Jan 2015 8:00AM

Great , i would like full resolution , images are a very important form of communication for diaspora and there are lot of images which need zoom in.

S

shirish Sun 28 Dec 2014 4:14PM

I am not able to see or download the screencast. Can you upload the screencast somewhere else from where people could download it ?

GK

Georg Krause Sun 28 Dec 2014 4:17PM

I can see it @shirish
didn't checked the code but i agree to this change ;)

DU

Thomas Leister Sun 28 Dec 2014 4:20PM

DU

Thomas Leister Sun 28 Dec 2014 5:45PM

@jhass (https://github.com/diaspora/diaspora/pull/5500#issuecomment-68212836)

You are partly right with the bandwidth thing, but I am assuming that most people who see a picture in their stream won't load the full version. The traffic would just slightly increase by those users who load the full version of a picture they are interested in.

There are Upload limits on Diaspora anyway, so the impact on bandwidth won't be too huge I think.

Maybe it would be a useful archievement to introduce a caching engine, which caches frequently requested images on the user's pod itself. Traffic would be more decentralized then.

JH

Jonne Haß Sun 28 Dec 2014 6:31PM

Yet another consideration is that presenting only a version to the user that went through server side processing, might in some rare cases actually protect against uploading a malicious image that could exploit a flaw in a browser implementation. Though that's a not too likely scenario I guess.

FS

Florian Staudacher Sun 28 Dec 2014 9:12PM

I'm all for increasing the lightbox image size, but I have to agree with @jhass here. The implementation should be on the server-side and if we're already touching that part, we could make it configurable as well.

Load More