SPIP

[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction

Download
Home > English documentation > Questions and Answers > Technical FAQ > Why does automatic creation of thumbnails not work with all image formats (...)

Why does automatic creation of thumbnails not work with all image formats (JPEG, GIF, PNG)?

August 2010

All the versions of this article:


[SPIP 1.4] The automatic creation of preview thumbnails uses a feature associated with PHP called "GD" (it is referred to as a "library"). This library is not part of the basic functions built into PHP, but is an option that has been developed separately (by Thomas Boutell), and which the managers of any particular servers may choose to install with PHP or not.

(1) The first consequence: some ISP hosts do not install GD with PHP. With these ISPs, the associated graphical functions just will not work. From our point of view, it is significant that SPIP will not be able to automatically generate its thumbnails.

The best option in such cases is to request the ISP to install the GD library for you.

(2) Since the GIF format was proprietary up until 2004, certain slightly older versions of GD do not support it. In fact, up until that date, it was a proprietary format which used some functions which were not "free" software (in particular, their owner claimed a royalty from graphical programmes which manipulated the GIF format). As a result, it could not be installed within a free software package. Nonetheless, being quite ignorant at the time of this copyright problem, the very earliest versions of GD did actually work with the GIF format.

Version 2 of GD has supported this format since 21st July 2004.

If GIF images are not working, you should ask your ISP to migrate to GD2 if it has not already done so.

(3) In order to work properly, the GD library itself uses other software and libraries to work with the PNG and JPEG formats. If the ISP has not yet installed those software programmes, GD itself will work, but will not be able to make use of one or the other of those formats. So even when using a recent version of GD, it is often the case that only the PNG format is usable, because the software necessary to work with JPEG have not been installed on the machine...

In such cases, ask your ISP to complete its installation so that the JPEG format is usable.


In the specific case of configuring SPIP, when you ask for the activation of automatic thumbnail creations, SPIP will test the three format images to determine which can be used on your ISP host. If you have understood the discussion above, you will now understand why you will never have use of all three image formats; frequently you will only have PNG and JPEG; occasionally only the PNG format; and even more rarely, only the GIF format. Of course, the minefield of patents and copyrights is constantly in flux, so future versions of SPIP and the graphics libraries may well change significantly, and this discussion may well become quickly outdated.


Show the template of this page Site powered by SPIP | Translation area | Private area