Our Biggest Sale Is Here
Up to 70% Off
Get the Deal

How to add images to a table in wpDataTables

Say your product catalog should show a photo of each product next to its name and price. An Image column takes the image URL from each cell and shows the picture in the table. It can also show a small thumbnail that opens the full-size image when a visitor clicks it.

How do I make a column an Image column with Tabella AI?

Open the table, click Ask Tabella AI and name the column and the type.

  1. Open the table. Go to wpDataTables → wpDataTables and click the table title.
  2. Ask Tabella AI. Click Ask Tabella AI and type, for example: Change the Photo column type to Image.
  3. Check and save. Tabella AI lists what it changed. Click Save Changes, or Undo table changes to go back.

How do I make a column an Image column in the column settings?

Set the column type to Image in the Data tab of the column settings and save the table.

  1. Open the column settings. Go to wpDataTables → wpDataTables, open the table and click the settings icon in the column header.
  2. Change the type. In the Data tab, set the column type to Image.
  3. Save the table. Click Save Changes.

In editable tables, people can paste the image URL with One-line edit.

How do I show a thumbnail that links to the full image?

In the source, write the thumbnail URL, two vertical bars and the full-size URL: everything before || is shown in the table, everything after it opens on click.

Value in the source What visitors see
https://example.com/mug-small.jpg||https://example.com/mug.jpg The small image, linked to the full-size image
https://example.com/mug.jpg The image itself, with no link

wpDataTables doesn’t create thumbnails, so upload a small version of each image yourself. To open full-size images in a lightbox, use a lightbox plugin; this works for tables that aren’t editable.

How does an Image column sort and filter values?

An Image column sorts alphabetically by the image URL and uses the Text filter, so sorting by this column rarely makes sense. Turn sorting off for it in the column’s Sorting tab.

Image columns already output HTML, so don’t wrap them in Transform value. To build your own image tag, for example with a set height, use a String column with Transform value.

What should I remember about image columns?

Set the column type to Image to show pictures from URLs, and write thumbnail||full-size in the source to link a thumbnail to the full image. wpDataTables doesn’t make thumbnails, and Image columns sort by URL, so turn sorting off for them.

Wait, Before You Download!

To get your hands on wpDataTables Lite, please enter your email address below. We’ll send you a direct download link and keep you updated on existing features along with helpful tips and tricks!

By continuing, I accept Privacy Policy and T&C
Mail Box