Okay
  Public Ticket #3537776
Error showing Image from MySQL DB
Closed

Comments

  • AUGUSTO B ARAUJO started the conversation

    Hi, table doesn´t show image datafield/column from mysql table properly.

    How can I overcome this issue.

    Thanks.

    Augusto

    Attached files:  wpDataTablesError_ImageField.png

  •  1,877
    Miloš replied

    Hello,

    Can you show us some screenshots or a Video, or if you can copy and paste one of the image cell data, so that we can see how are you formatting the image links in your Source SQL Database Table?

    1. For example, if you are just storing it in the cell(s) as the image URL, such as :

    http://yourSite.com/imageName.png
    

    In this case, you can use our Image Column, just please check more details explained on the rendering rules of our Image Columns here.

    We will copy the important details here :

    “Image” link columns are used to render images in the table, either in full size, or as a link from a thumbnail to a full size image.

    • Rendering rules: If the content of the cells contains a combination of “two sticks” – || – everything to the left of this combination is used as a link to the thumbnail, and everything to the right as a link to the full image size, for example like this :
    http://domain.com/thumb.png||http://domain.com/fullsize.png
    

    If the “||” combination is not found in the content, the entire content will be used as a link to a full-size image.

    • Please note that the plugin does not create thumbnails (at least for the moment), so you will need to take care of this yourself.
    • If you would like to open full-size images in a Lightbox, you can use a plugin for that, e.g. WP Lightbox 2  (please note that this is available only for tables that aren’t editable, so if you enable server-side processing in your SQL Table, it won't work)

    2. Or, if you are storing the image data with complete HTML with the image tag, for example like :

    <img src="imageURL.jpg">
    

    In that case, you need to use our String Columns, because this type of Column renders custom HTML.

    To summarize, Image columns automatically create the Image HTML around your image source URL, and you can combine the thumbnail URL with two stick symbol followed by full sized image URL;

    and you will be able to use Lightbox ( only with server-side disabled);

    Or if you try String Columns - then your source cell needs to have the Image HTML around the image URL for it to work.

    -

    Let me know if that helps?

    If not, please show us more details how do you format your image cells in the SQL.

    Thanks.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables