You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In this article, we are going to show you how to quickly show file/images itself without first downloading the file.

Sample screenshots:-

Clicking on any image in the file/image upload element will bring up lightbox, displaying the photo.

In any form that contains Image Upload field, add a Custom HTML and put in the following code.

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha256-Vzbj7sDDS/woiFS3uNKo8eIuni59rjyNGtXfstRzStA=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js" integrity="sha256-yt2kYMy0w8AbtF89WXb2P1rfjcP/HTHLT7097U8Y5b8=" crossorigin="anonymous"></script>

<script type="text/javascript">
$(function(){
// Init fancybox
$().fancybox({
selector : 'ul.form-fileupload-value > li > a:has(img)',
thumbs : {
autoStart : true
}
});
}); 
</script>
  • No labels