gravity form preview thumbnails for multi file upload field

We are using Gravity Forms to attach multiple images to a gallery custom field and create new post. We can't figure out how to show the image thumbnails under the import HTML5 import field instead of just the file names prior to form submission. This previous answer covers only single file upload: gravity form preview of image upload That mechanism is different it seems. I also see GF offers a JS function to filter the image data returned but I can't figure out how to get the temporary img urls to display tags. That reference is here:

gform.addFilter('gform_file_upload_markup', function (html, file, up, strings, imagesUrl) < var formId = up.settings.multipart_params.form_id, fieldId = up.settings.multipart_params.field_id; html = '' + file.name + " "; return html; >); 
asked Aug 7, 2018 at 15:53 Studioleland Studioleland 51 1 1 silver badge 6 6 bronze badges

2 Answers 2

To show the preview of the image with just thumbnail size. You need to convert your image to the base64 so it will not take much time to load and it will show perfect.

 /** * Upload image action for Gravity Forms * This script displays the thumbnail upon image upload for multi file field. * */ function gravity_image_thumb() < if ( is_page('slugname') ) < ?>  > add_action('wp_head','gravity_image_thumb');