how to make thumbnails with php

前端 未结 8 671
情话喂你
情话喂你 2020-12-11 10:55

I was just wondering how I can make thumbnails of images stored in hdd and use them in an html page, also I need the thumbnails to be able to enlarge (to their original size

相关标签:
8条回答
  • 2020-12-11 11:31

    In my experience GD is not very memory-effective for large images, so I strongly encourage you to use Imagick. I`ve written a code snippet for thumbnail generation with php using the Imagick library. You can modify it to save the image instead of echoing it using http://php.net/manual/en/imagick.writeimage.php

    0 讨论(0)
  • 2020-12-11 11:32

    The gd library allows you to manipulate images. You will find an article to generate thumbnails here.

    If you want to allow your users to view the thumbnail and the original size, the best way is to keep the two versions. And to display either one or the other.

    0 讨论(0)
提交回复
热议问题