Page 1 of 1

Photo Gallery, photos are not displayed

Posted: 08 Sep 2020, 04:32
by montchoco
Good morning,

since a recent update, my Photo Gallery looks like this:

Image
Link: https://suprima.ch/Amerika/USA/

However, if I click on a "photo", the photo is displayed and I can scroll through the photos.

How can I solve this problem?

Thank you
Martin

Re: Photo Gallery, photos are not displayed

Posted: 08 Sep 2020, 04:54
by mjau-mjau
Hi. I see your server is returning internal server errors for image resize requests:
https://suprima.ch/render/w480/3.Amerika/4.USA/usa1_DxO.jpg

I also see this is Windows Microsoft-IIS/10.0 server ... They don't offer normal Linux hosting? Do you have FTP access for me? I will need to diagnose why the web.config file seems to be creating an error.

Re: Photo Gallery, photos are not displayed

Posted: 10 Oct 2020, 03:19
by jodchin
I have the same problem
http://wpblog.mpcheshi.com/

Re: Photo Gallery, photos are not displayed

Posted: 10 Oct 2020, 03:21
by jodchin
mjau-mjau wrote: Hi. I see your server is returning internal server errors for image resize requests:
https://suprima.ch/render/w480/3.Amerika/4.USA/usa1_DxO.jpg

I also see this is Windows Microsoft-IIS/10.0 server ... They don't offer normal Linux hosting? Do you have FTP access for me? I will need to diagnose why the web.config file seems to be creating an error.
I have the same problem

http://wpblog.mpcheshi.com/

Re: Photo Gallery, photos are not displayed

Posted: 10 Oct 2020, 06:34
by mjau-mjau
jodchin wrote:I have the same problem
The reason is different though. You are using Ngninx server:
http://wpblog.mpcheshi.com/render/w480/ ... apples.jpg

The problem is your NGINX is not rewriting the URL to the X3 image resizer. It just fails when it can't find the image, whereas correct behavior is to rewrite the url to point to the X3 resizer if the file does not exist, in which case it will be created and output.

Did you setup NGINX config? I have example here:
https://gist.github.com/mjau-mjau/6dc19 ... e566a8457b

Nothing wrong with running nginx servers, but this always requires customization because nginx (unlike Apache) does not support .htaccess file (included with X3), which takes care of the rewrite rules for you.

Also, just FYI, this server does not support EXIF.

Re: Photo Gallery, photos are not displayed

Posted: 12 Oct 2020, 02:20
by jodchin
mjau-mjau wrote:
jodchin wrote:I have the same problem
The reason is different though. You are using Ngninx server:
http://wpblog.mpcheshi.com/render/w480/ ... apples.jpg

The problem is your NGINX is not rewriting the URL to the X3 image resizer. It just fails when it can't find the image, whereas correct behavior is to rewrite the url to point to the X3 resizer if the file does not exist, in which case it will be created and output.

Did you setup NGINX config? I have example here:
https://gist.github.com/mjau-mjau/6dc19 ... e566a8457b

Nothing wrong with running nginx servers, but this always requires customization because nginx (unlike Apache) does not support .htaccess file (included with X3), which takes care of the rewrite rules for you.

Also, just FYI, this server does not support EXIF.
Thanks for your reply.
I have setup nginx config as your example
http://wpblog.mpcheshi.com/render/w320-c3.2/galleries/landscapes/ridge.jpg
This image are not found, What is the real address for this image?
http://wpblog.mpcheshi.com/app/parsers/slir/index.php?w1024/galleries/landscapes/antarctica.jpg
Is this Right?

Re: Photo Gallery, photos are not displayed

Posted: 12 Oct 2020, 03:10
by mjau-mjau
jodchin wrote:http://wpblog.mpcheshi.com/render/w320-c3.2/galleries/landscapes/ridge.jpg
This image are not found, What is the real address for this image?
The address of the original image can be found by replacing /render/{resize params}/ with /content/. In the case above, that would mean:
/content/galleries/landscapes/ridge.jpg

After the resized version is created for the first time, the render path becomes the "real address" for the resized version /render/w320-c3.2/galleries/landscapes/ridge.jpg. The cased version will get created in that path. Until then, the path should "rewrite" to /app/parsers/slir/index.php, which will take the parameters in the URL and created the resized version in the specified location.
That is the url where it should rewrite to yes (if render file does not exist). However, it will not work exactly like that URL ... The resizer app would still need/use the original url (/render/w1024/) to extract width/crop/path parameters.

Let me know how it goes!

Re: Photo Gallery, photos are not displayed

Posted: 13 Oct 2020, 01:42
by jodchin
mjau-mjau:
jodchin wrote:http://wpblog.mpcheshi.com/render/w320-c3.2/galleries/landscapes/ridge.jpg
This image are not found, What is the real address for this image?
The address of the original image can be found by replacing /render/{resize params}/ with /content/. In the case above, that would mean:
/content/galleries/landscapes/ridge.jpg

After the resized version is created for the first time, the render path becomes the "real address" for the resized version /render/w320-c3.2/galleries/landscapes/ridge.jpg. The cased version will get created in that path. Until then, the path should "rewrite" to /app/parsers/slir/index.php, which will take the parameters in the URL and created the resized version in the specified location.
That is the url where it should rewrite to yes (if render file does not exist). However, it will not work exactly like that URL ... The resizer app would still need/use the original url (/render/w1024/) to extract width/crop/path parameters.

Let me know how it goes!


        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

This is the reason,When I Comment this nginx config, Everything goes fine