Examples of transformations
We will now discuss a few transformation examples. Typical option values are shown, and it's recommended to tweak them until we have achieved the desired results. Depending on the phpMyAdmin version, more transformations may be available.
Clickable thumbnail (JPEG or PNG)
We will start by changing our cover_photo column type from BLOB to LONGBLOB to ensure that we can upload photographs bigger than 65 KiB in size. We then enter the attributes shown in the following screenshot:
Here, the options are presented in the form of width and height. If we omit the options, the default values are 100 and 100. The thumbnail generation code preserves the original aspect ratio of the image. Therefore, the values entered are the maximum width and height of the generated image. We then upload a .jpeg
file in a cell (using instructions from Chapter 5). As a result, we get the following screen in Browse mode for this table:
This thumbnail can be clicked to reveal a full-size photograph...