I’ll look into switching over. I need to overhaul the css that controls it anywhere. Weird proportions can cause it to look odd.
// Made it work when commented out some css attributes
// Plus php, js changes bellow
#featuredgallerydiv ul li {
margin:10px 10px 0 0;
position:relative;
/* width:100%; */
}
#featuredgallerydiv ul li {
/* width:32%; */
/* margin-right:1%; */
float:left;
}
#featuredgallerydiv ul li img {
/* width:100%; */
height:auto;
display:block;
}
// PHP changes in metabox.php function fg_display_metabox()
// replace $galleryHTML lines with two lines, see
// $galleryHTML .= '<li>'.$button.'<img id="'.$id.'" src="'.wp_get_attachment_url( $id ).'"></li> ';
$image_attributes = wp_get_attachment_image_src( $id,'thumbnail' );
$galleryHTML .= '<li>'.$button.'<img id="'.$id.'" src="'. $image_attributes[0].'"></li> ';
// JS changes in admin.js#L79
// replace imageHTML
// imageHTML += '<li>'+button+'<img id="'+attachment.attributes.id+'" src="'+attachment.attributes.url+'"></li>';
imageHTML += '<li>'+button+'<img id="'+attachment.attributes.id+'" src="'+attachment.attributes.sizes.thumbnail.url+'"></li>';
I’ve made changes recently to the styling of the images to help things look better, but I am going to leave it using large images for now, because they look better in my opinion on high resolution screens. I may add a filter for this in the next release though.
I appreciate the feedback and the actual code suggestions.
Do you have the filter to the image size?
– ps: large images are too large ( ~1600px width..) for the admin display.