0
Not a bug

thumbnail preview stopped working (Vips and ImageMagik is enabled, all with correct permissions)

editor1 shell 12 months ago updated by Vlad R 12 months ago 12

As in the title. This was working perfectly fine yesterday. Absolutely no changes where made to the server. 
What I noticed, is thumbnails are generated in the thumbnail cache folder, just not being served online. Image preview doesn't work either. However, opening image in new tab works fine.
Running on ubuntu server +mariadb +apache2
tested with images uploaded via web browser and via moving them into home directory directly on the back end.

Image 863

Image 862

Jsut to add, old thumbnails work fine, only thumbnails for new files not working.

ran make_thumbs.php, here's output:

9 /nshares/dell/share1/test/3a.JPG .............................................. ... No thumb needed
8 /nshares/dell/share1/test/aaass.JPG ........................................... ... Failed!
7 /nshares/dell/share1/test/ati.JPG ............................................. ... Failed!
6 /nshares/dell/share1/test/monke.JPG ........................................... ... Failed!
5 /nshares/dell/share1/test/nna.JPG ............................................. ... No thumb needed
4 /nshares/dell/share1/test/qiss1.PNG ........................................... ... Failed!
3 /nshares/dell/share1/test/qiss2.PNG ........................................... ... Failed!
2 /nshares/dell/share1/test/se1.JPG ............................................. ... Failed!
1 /nshares/dell/share1/test/se2.JPG ............................................. ... Failed!
0 /nshares/dell/share1/test/vtr.JPG ............................................. ... No thumb needed

Under review

Right-click a file, select the Control panel option under “More options”. You will find in there troubleshooting tools which will help you find out what happens behind the scene and where the problem might be.

Debugger sees nothing wrong:

Thumbanil:

Debugging is on (1639572523)

Request options:

Array

(

[type] => preview

[width] => 1280

[height] => 720

[skipNotification] => 1

[caching] =>

[keepCache] => 1

[debug] => 1

)

In use options:

Array

(

[type] => preview

[width] => 20000

[height] => 20000

[skipNotification] => 1

[caching] =>

[keepCache] => 1

[debug] => 1

[geometry] => contain

[pageNo] => 0

[forceExt] => jpg

)

Processing: /nshares/dell/share1/test/3a.JPG

As: jpg

File size: 40429 bytes (39 KB)

File is safe for web.

Not checking JPG resolution.

Displaying actual file: /nshares/dell/share1/test/3a.JPG

Processing time: 0.0008 seconds.

Preview generation:

Debugging is on (1639572513)

Request options:

Array

(

[skipNotification] => 1

[caching] =>

[keepCache] => 1

[debug] => 1

)

In use options:

Array

(

[skipNotification] => 1

[caching] =>

[keepCache] => 1

[debug] => 1

[width] => 400

[height] => 400

[geometry] => contain

[pageNo] => 0

[forceExt] => jpg

)

Processing: /nshares/dell/share1/test/3a.JPG

As: jpg

File size: 40429 bytes (39 KB)

File is safe for web.

File is smaller than 8 MB.

Checking image resolution.

Image size is 940 x 450

Requested size is 400 x 400

Displaying actual file: /nshares/dell/share1/test/3a.JPG

Processing time: 0.0035 seconds.

Please run the troubleshooting on a file that actually fails. The selected one doesn't need a resized thumbnail.

Looks like the issue is with how I installed VIPS. All I got on my system after getting libvips pakcages from Ubuntu repository is


/usr/bin/libvips/doc/Using-vipsthumbnail.md
/usr/bin/libvips/doc/Using-vipsthumbnail.xml
/usr/bin/libvips/man/vipsthumbnail.1
/usr/bin/libvips/tools/vipsthumbnail.c


no usr/bin/vipsthumbnail



Is usr/bin/vipsthumbnail supposed to be folder or file ?

Debugging is on (1639579757)
Request options:
Array
(
    [skipNotification] => 1
    [caching] => 
    [keepCache] => 1
    [debug] => 1
)
In use options:
Array
(
    [skipNotification] => 1
    [caching] => 
    [keepCache] => 1
    [debug] => 1
    [width] => 400
    [height] => 400
    [geometry] => contain
    [pageNo] => 0
    [forceExt] => jpg
)
Processing: /nshares/dell/share1/test/fern-m-lomibao-w3hcLweARko-unsplash.jpg
As: jpg
File size: 14049826 bytes (13.4 MB)
File is safe for web.
File is larger than 8 MB so it will get processed.
Removing expired lock: /tcache/nshares/dell/share1/test/fern-m-lomibao-w3hcLweARko-unsplash.jpg/14049826/400_400_contain[1].png.lock
Creating lock: /tcache/nshares/dell/share1/test/fern-m-lomibao-w3hcLweARko-unsplash.jpg/14049826/400_400_contain[1].png.lock
Resizer: \FileRun\Thumbs\Resizers\Vips
Resizing using Vips
Running: "usr/bin/vipsthumbnail" --vips-info "/nshares/dell/share1/test/fern-m-lomibao-w3hcLweARko-unsplash.jpg" --size '400x400>' -o "/tcache/nshares/dell/share1/test/fern-m-lomibao-w3hcLweARko-unsplash.jpg/14049826/400_400_contain[1].png" 2>&1
Returned code: 127
--------------------
sh: 1: usr/bin/vipsthumbnail: not found
--------------------
Resize failed.
Processing time: 0.0024 seconds.
Sending no content headers.


Debugging is on (1639579788)
Request options:
Array
(
    [type] => preview
    [width] => 1280
    [height] => 720
    [skipNotification] => 1
    [caching] => 
    [keepCache] => 1
    [debug] => 1
)
In use options:
Array
(
    [type] => preview
    [width] => 20000
    [height] => 20000
    [skipNotification] => 1
    [caching] => 
    [keepCache] => 1
    [debug] => 1
    [geometry] => contain
    [pageNo] => 0
    [forceExt] => jpg
)
Processing: /nshares/dell/share1/test/fern-m-lomibao-w3hcLweARko-unsplash.jpg
As: jpg
File size: 14049826 bytes (13.4 MB)
File is safe for web.
Not checking JPG resolution.
Displaying actual file: /nshares/dell/share1/test/fern-m-lomibao-w3hcLweARko-unsplash.jpg
Processing time: 0.0008 seconds.

Looks like you are running Linux. What distribution and version is it, I will try to find the right installation guide for you.

Thank you Vlad. I'm running basic Ubuntu Server 20.04

curl -o /tmp/vips.tar.gz -L https://github.com/libvips/libvips/releases/download/v8.12.1/vips-8.12.1.tar.gz
tar zvxf /tmp/vips.tar.gz -C /tmp
cd /tmp/vips-8.12.1
./configure --enable-debug=no --without-python $1
make && make install
ldconfig

This is for compiling the latest vips version.

When I run last command "ldconfig" it doesn't do anything. Make and Make Install seem to do something. I may be nissing something here. Will stick to ImageMagik for now. In any case, this can be closed now, the issues was vips setup. reverting to ImageMagic solves everything.

If the make install didn't error our, it means vips is installed on your server. You can try 

vipsthumbnail --version

to confirm.