I read through the code, and this will create a local thumbnail from an image based on a URL, it will not create a website thumbnail. Creating a site thumbnail is much more complicated since you basically need to render the web site in memory, then generate a thumbnail from that image.
Hi Yannick,
I believe that is what is needed correct — create a local thumbnail from an image based on a URL. To be specific I was referring to the Button “Generate thumbnail and store locally” on the Edit Link page. i believe it would grab the image from the “Image URL” field and generate the thumbnail and store it in the “uploads/link-library-images/” folder. Right.
Yes, that code would take an existing image from a site, and make a thumbnail of it. But that would just be a single image from a page, not an image of the entire page! The current thumbnail feature uses third-party services to generate images from the entire site. That takes much more than a few lines of code.
I guess it would depend on the use. I am thinking though that you would have clients would use linklibrary to reference actual posts ( and link to an actual image) versus websites.
Also I am seeing that even if we put in the link to an actual image in “Image URL” and then click on “Generate thumbnail and store locally”, it would not create a thumbnail of the current image but of the website. Was that the correct intent?
Thanks, Hilario
Worry for the lack of response. Yes, that is the correct intent. If you want a small image, you should resize it outside of WordPress and import the image at the correct resolution.