Cmb2: Set preview size for File and File_List fields

Created on 4 Jan 2017  路  8Comments  路  Source: CMB2/CMB2

So far, when you upload an image using file or file_list fields, I noticed that the thumbnail shown is referencing the original size image, and not a Wordpress generated thumbnail, which can be quite slow when loading large photos.

Also, thumbnail size can't be set in file fields, which can get very large sometimes, depending on image aspect ratio.

It would be really appreciated that we could use an array(width, height), a predefined image size as in themes or the sizes available in Blog settings.

Thanks in advance.

enhancement

All 8 comments

As an alternative, I believe the plugin may use the attachment ID as the array key for the stored value, which could be used to fetch alternative sizes as requested.

Not going to close this outright, because it is still valid feedback, worth considering.

You can set the preview size using the aptly named preview_size field parameter: https://github.com/WebDevStudios/CMB2/wiki/Field-Types#custom-field-attributes-5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cehojac picture cehojac  路  3Comments

tw2113 picture tw2113  路  8Comments

stabilimenta picture stabilimenta  路  8Comments

GaryJones picture GaryJones  路  3Comments

djob195 picture djob195  路  4Comments