{"id":1441,"date":"2018-01-25T10:19:47","date_gmt":"2018-01-25T15:19:47","guid":{"rendered":"https:\/\/www.bates.edu\/wordpress\/?p=1441"},"modified":"2024-11-13T16:06:32","modified_gmt":"2024-11-13T21:06:32","slug":"enhancements-fixes-for-image-galleries","status":"publish","type":"post","link":"https:\/\/www.bates.edu\/wordpress\/2018\/01\/25\/enhancements-fixes-for-image-galleries\/","title":{"rendered":"Enhancements &#038; Fixes for Image Galleries"},"content":{"rendered":"<p>Today we are releasing two new enhancements to our image galleries as well as a couple of fixes.<\/p>\n<h3>Optional Thumbnails<\/h3>\n<p><a href=\"https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/Screen-Shot-2018-01-25-at-9.13.55-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-1442 size-medium\" src=\"https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/Screen-Shot-2018-01-25-at-9.13.55-AM-319x300.png\" alt=\"\" width=\"319\" height=\"300\" srcset=\"https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/Screen-Shot-2018-01-25-at-9.13.55-AM-319x300.png 319w, https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/Screen-Shot-2018-01-25-at-9.13.55-AM-768x723.png 768w, https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/Screen-Shot-2018-01-25-at-9.13.55-AM-900x848.png 900w, https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/Screen-Shot-2018-01-25-at-9.13.55-AM-200x188.png 200w, https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/Screen-Shot-2018-01-25-at-9.13.55-AM.png 1442w\" sizes=\"(max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p>You can now add clickable thumbnails to the bottom of a gallery by adding the attribute <span class=\"code\">thumbnails=&#8221;true&#8221;<\/span> to the gallery shortcode.<\/p>\n<div>\n<p>If you are an advanced user, you can also customize the size of the thumbnails by using the <span class=\"code\">thumbnailsize<\/span> attribute and passing in any css size. They default to 100px in height.<\/p>\n<p>Please note that there is a small performance hit for using thumbnails. Usually the slideshow will only load each image as it is needed, increasing the speed with which the page initially loads (and potentially decreasing dataplan use when a user doesn&#8217;t need to look at all the images in the slideshow). However, when thumbnails are activated, all of the images will be loaded up front. If you have less than, say, 5 or 6 images it&#8217;s not much of a concern, but for larger galleries it&#8217;s worth considering.<\/p>\n<h2>Swipe Detection<\/h2>\n<p>The gallery will now detect left and right &#8220;swipes&#8221;\u00a0 on smartphones and move accordingly. This is an &#8220;always-on&#8221; feature, but to really capitalize on the effect, you could set the slide change effect to\u00a0<strong>scroll<\/strong> (instead of the default\u00a0<strong>fade<\/strong>). You can do this by setting <code>effect=\"scroll\"&lt;\/code.<\/code><\/p>\n<h3>Fixes<\/h3>\n<p><strong> Caption \/ Control Independent Visibility<\/strong>. Previously if you turned off the controls, the captions also were hidden. There was no way to show captions without also showing the controls. This accidental interdependence is now fixed.<\/p>\n<p><strong>Better centering of images<\/strong>. Sometimes when the fullscreen gallery was opened, the initial image wasn&#8217;t centered. This has been improved.<\/p>\n<hr \/>\n<h2>General Usage Reminder<\/h2>\n<p>The best way to create and customize the gallery is to use the basic WordPress method of creating a new gallery, then add any necessary attributes to the shortcode afterwards. In this clip I am doing just that:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1447 size-full\" src=\"https:\/\/www.bates.edu\/wordpress\/files\/2018\/01\/2018-01-25_09-58-06.gif\" alt=\"\" width=\"1248\" height=\"798\" \/><\/p>\n<p>For further attributes and use, see the <a href=\"https:\/\/www.bates.edu\/wordpress\/wordpress-101\/shortcode-reference\/#gallery\">full Shortcode Reference<\/a>, or checkout the quick Shortcode Reference on the WordPress Dashboard.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today we are releasing two new enhancements to our image galleries as&hellip;<\/p>\n","protected":false},"author":428,"featured_media":1442,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_hide_ai_chatbot":false,"_ai_chatbot_style":"","associated_faculty":[],"_Page_Specific_Css":"","_bates_restrict_mod":false,"_batesModPostContentOverride_prepend":false,"_batesModPostContentOverride_append":false,"_batesModPostContentOverride_append_before_footer":false,"_table_of_contents_display":false,"_table_of_contents_location":"","_table_of_contents_disableSticky":false,"_is_featured":false,"footnotes":"","_bates_seo_meta_description":"","_bates_seo_block_robots":false,"_bates_seo_sharing_image_id":0,"_bates_seo_sharing_image_twitter_id":0,"_bates_seo_share_title":"","_bates_seo_canonical_overwrite":"","_bates_seo_twitter_template":""},"categories":[1],"tags":[5],"class_list":["post-1441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-shortcodes"],"_links":{"self":[{"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/posts\/1441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/users\/428"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/comments?post=1441"}],"version-history":[{"count":2,"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/posts\/1441\/revisions"}],"predecessor-version":[{"id":3707,"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/posts\/1441\/revisions\/3707"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/media\/1442"}],"wp:attachment":[{"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/media?parent=1441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/categories?post=1441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bates.edu\/wordpress\/wp-json\/wp\/v2\/tags?post=1441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}