photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: rreyer on March 22, 2021, 08:33:02 AM

Title: Custom HTML Gallery - Help needed
Post by: rreyer on March 22, 2021, 08:33:02 AM
I'm trying to build my own HTML gallery and so far it works better than I thought.
But there are some problems that I need help with.

I'd like my gallery to be super-simple:

*image 1*

From iMatch I would create the swatches (with Design&Print) and the JPGs (Export), both have the same names.
My Python script would then build an HTML for a complete year and include jump markers for events (categories which it finds in the JPGs).

*image 2*

So far it works great on my PC with Firefox when I open the HTMLs directly, via the file system  8)

But then I thought it would be great if I could browse my gallery on the sofa with my iPad.
Unfortunately, iOS 14 does not allow to open an HTML directly from the file system  :'(

So I installed a small web server on my NAS.
Fortunately, this was done at the push of a button, because I have just as little knowledge of web servers as I do of HTML.
I can load the gallery now from my iPad  8)

But there are still two problems:

Questions:





Title: Re: Custom HTML Gallery - Help needed
Post by: Aubrey on March 23, 2021, 02:37:08 PM
Hi,
First off, I can't help you with your issue, perhaps one of the forums dealing with these software might deliver more information. It's really a jpg issue rather than IMatch issue.

I'm slowly learning HTML JS and node.JS. It's fun but also a minefield! Eventually I may get to building my own gallery.

However, that having been said, if you really want to view files remotely and also have interactive filters, I suggest that you have a look at IMatch Anywhere (https://www.photools.com/imatch-anywhere/imatch-anywhere-licensing/). The Home edition costs $55 and probably will fulfill your needs.

As always, you can download and play with it for a month without any cost!

I've been using it since inception. There is no way I'll ever be able to have a html/js gallery as efficient as IMA.

BTW IMA and IMatch are set by default pause if you want to load a lot of images .... and 8,000 is a lot!

Aubrey.

Title: Re: Custom HTML Gallery - Help needed
Post by: Mario on March 23, 2021, 03:06:27 PM
8,000 images is ridiculous. It will stress the server and the browser to no end.
Usually you would implement this with a so-called observer pattern to lazy-load the images when they actually come into view. Loading images not visible is a waste of resources.
But this is of course a bit more complex than using plain <img> tags.

If you request the images from IMWS, make sure you request the thumbnail and not the full-sized image. If you request a 4000 pixel cache image just to make the browser scale it down to 160 pixel, you are again wasting a lot of bandwidth and cause stress for the server and browser. And Safaris is not known to to be one of the better browsers - just the only one Apple allows on their systems.
Title: Re: Custom HTML Gallery - Help needed
Post by: rreyer on March 23, 2021, 08:59:49 PM
Hi Aubrey,
I agree with you, 8.000 images is a lot.

While it works fluently on the PC, all browsers on the iPad show issues with that.

It works much better on the iPad after I've scaled the swatches down to 200x200.

I'm not sure but I believe that I am using "lazy loading" like Mario suggested.
Here is one line of code from the HTML:
<a class="spotlight" id="pic_2006.01.06-13.58.38.jpg" href="./2006/Images/pic_2006.01.06-13.58.38.jpg"> <img src="./2006/Swatches/pic_2006.01.06-13.58.38.jpg" width="200" height="200" alt="pic_2006.01.06-13.58.38.jpg" loading="lazy"> </a>

What still bothers me is the issue with the jump marks.
It works just fine on the PC with Firefox (via file system or web server).

But on the iPad there is trouble with most browsers:
Safari, Firefox, Edge, Chrome, iCab Mobile

Edge is pretty good and only one row of images off.
Unfortunately, Safari seems to be the only one that can scale not only the fonts but also the image swatches.

Title: Re: Custom HTML Gallery - Help needed
Post by: Mario on March 23, 2021, 09:59:08 PM
Safari has many issues with many of the more modern web technologies.
Check one of the web sites which have stats about whether or not specific Safari versions support specific versions, in which version and on which platform.

I hope one of the other community members can help you. Or you put your question up on StackExchange.
Please understand that I have no time to debug apps or scripts written by users.