开发者

PhpThumb requires so much disk space

开发者 https://www.devze.com 2023-03-28 02:42 出处:网络
I am using phpthumb: http://phpthumb.sourceforge.net/ I have about 500Mb of images on my server and phpthumb creates 2 little thumbs for each image ( 100x100 300x300 ). The problem is that the phpthu

I am using phpthumb: http://phpthumb.sourceforge.net/

I have about 500Mb of images on my server and phpthumb creates 2 little thumbs for each image ( 100x100 300x300 ). The problem is that the phpthumb folder ( with cached images ) is 7GB. So, how is possible ? 500MB of images and 7GB of thumbs ?

However, if anyone know how to resolve this issue, could you tell me some other way to create thumbs without using too many disk space ?

EDIT: Thi开发者_Go百科s is what there are in the cached folder of 7GB:

 wonder@wonder:~/webapps/mysite/phpthumb/cache$ ls
pThumbdcgAn0  pThumbgOV4iT  pThumbk7kCaR  pThumbnjieys  pThumbPYULm9  pThumbrpmRrw  pThumbTEwQ7J  pThumbV0veyL  pThumbwQ9q6G  pThumbYerk1C  pThumbZZuYuh
pThumbdcgpYI  pThumbgOzg8d  pThumbk7kNm7  pThumbnjKVPy  pThumbPYXGiL  pThumbrpMZWp  pThumbtEXnH5  pThumbv0wl2w  pThumbWQbPOg  pThumbyeRvzX  pThumbZZV7lg
pThumbdCH7V8  pThumbgp1cEO  pThumbk7mCU9  pThumbnJlTyj  pThumbPyy54W  pThumbrPnANX  pThumbTEXtUw  pThumbv0wSQJ  pThumbWqC6Z5  pThumbYEsW3P  pThumbZZvxCD
pThumbdcHexw  pThumbgp1Whz  pThumbk7W8mB  pThumbnjmSux  pThumbpyYiD3  pThumbRpnIJb  pThumbteZZjl  pThumbv0X5R0  pThumbwqgpU1  pThumbYEUOtG  pThumbZZXaCj
pThumbdCI3vo  pThumbgp6H6n  pThumbk7wI6P  pThumbnjNjg6  pThumbpYZ4Gx  pThumbRpnO9s  pThumbTf12uv  pThumbv0XInS  pThumbwqGx7p  pThumbYEVl3E  pThumbZzXPmQ
pThumbdCLpoL  pThumbgpAuiN  pThumbk89Sgb  pThumbnjNUa9  pThumbPZ1ZgP  pThumbrpPUU8  pThumbtf8DKF  pThumbv0xrXD  pThumbWqHG77  pThumbyEW6aJ  pThumbZZyvlJ
pThumbdcmGQa  pThumbgpbD5D  pThumbk8AuZH  pThumbnJNXur  pThumbPz3s0y  pThumbrPq1iF  pThumbTF9EAZ  pThumbV0zYo9  pThumbwQhr5Z  pThumbyEWeyI  pThumbzZYwnw
pThumbdCOoaQ  pThumbgpbNws  pThumbk8E6c4  pThumbnJpfR6  pThumbpz4Ri4  pThumbrPqHbg  pThumbtfAwO2  pThumbV11Qhr  pThumbWqkIun  pThumbYEWSSb  pThumbZZZ81f
pThumbdCQzjy  pThumbgpdBn6  pThumbk8hkeR  pThumbnJpOpb  pThumbpz6LJE  pThumbrpqjno  pThumbTfCloj  pThumbv123te  pThumbWQkmfe  pThumbyeXUVM  pThumbzZz88B.....


wonder@wonder:~/webapps/mysite/phpthumb/cache$ du
4   ./0/0b/0b4/0b44
8   ./0/0b/0b4
12  ./0/0b
16  ./0
4   ./4/49/495/4958
8   ./4/49/495
12  ./4/49
4   ./4/4e/4e7/4e72
8   ./4/4e/4e7
12  ./4/4e
28  ./4
5839852 .


It depends on the format you're writing your images too and the average size of the images when you upload them. However, I agree this is way too high.

I'm using http://phpthumb.gxdlabs.com/ for writing thumbs. It works very fast, uses the built-in ImageMagick stuff and contains some really great algorithms.


For anyone following the advice to use the gdxlabs version, that site now contains a link to their github account. The forums explain that the mention of ImageMagick support was more a todo then functionality already supported:

https://github.com/masterexploder/PHPThumb/issues/29

I found this out a month after running live with it. My website host won't raise the memory limit above 100 MBs, so I am now having to convert back to the sourceforge version. The API for the gxdlabs was definitely better, but I have now had a few users with images slightly above 1 MB which blow out the GD implementation above the 100MB limit.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号