05- Create Image field to display gallery and panorama
Image field is one of the best powerfull field for flexicontent, you can create many rules to simplify image insertion for end-user :
- Rezizing on upload with 4 sizes (original, large, medium, small)
- Crop or rezize each thumbs
- Watermark
- Using screenset
- Checking extension
- Rebuild thumbs
- Protect image access
- Folder mode or DB mode
- Mixe image and video
- Layout output with 7 gallery script (prebuild) and you can create your own
- Choosing layout peer display device (desktop and mobile)
Now we create 2 fields, one for first image and one for gallery
- create a field "first image"
- choose image field type
- assign field to your type
- set no for multiple values option
Check display
- Go to viewing tab
- Â Set to no display label option
No we will set thumbnails creation
- Got to thumbnails tab
- Set size for optimisation
- Set rule for size
- Set processing (rezize or crop)
- Set watermark if needed
You can do it for 3 sizes large, medium, small
This process is done on upload file in content, if you change size you need to clean images folder (only rezized file, not original)
Now we can check how field is displayed, in the layout tab you can set many option for display it in item view and category view
- Go to layout tab
- Choose the galery style for desktop
- Set the size of iage regarding view
- In next tab you can set option display for each layout
In this case we choose fancybox gallery, its a simple modal script to open large image. we didn't need more.
Now we can do a gallery field with video integration, its realy simple
Do the same thing like above
- Allow multi-values
- Allow video insertion
- Choose a gallery layout like galleiffic
- Set option
Now user can add image and video in same field, changing order by simple drag and drop !