Upcoming change to version 7 galleries


#1

I wanted to give everyone on version 7 a heads up about an upcoming change to the way gallery thumbnails are handled.

The issue

In version 5, thumbnails were ONLY generated if you included at least one of the following attributes on your gallery regions:

  • data-thumbnail-width
  • data-thumbnail-height

Currently, in version 7, thumbnails are always generated and there’s no way to disable this behavior. This is not consistent with version 5’s behavior. The upcoming change will simply make thumbnails in version 7 behave like version 5.

Who will this affect?

This will only affect you if:

  • You’ve created one or more galleries in version 7 that don’t have either of the above data attributes

  • You’ve added galleries inside block regions and haven’t set data-gallery-thumbnail-width or data-gallery-thumbnail-height on the block region.

The Solution

You can maintain the same exact behavior after this change by adding the following attributes to all gallery regions:

data-thumbnail-width="256"
data-thumbnail-height="256"

For galleries that are placed inside block regions, add these attributes to the block region element:

data-gallery-thumbnail-width="256"
data-gallery-thumbnail-height="256"

:warning: These changes can be applied to your sites right now. There’s no need to wait until this issue is resolved to make this change!

Why is this change necessary?

This change is being made to ensure backwards compatibility with version 5 and to give users the ability to opt in to thumbnail generation.

Apologies for the inconvenience!