display: inline-block;
overflow: hidden;
text-align: center;
+ background-size: contain;
background-position: 50% 50%;
background-repeat: no-repeat;
background-color: transparent;
<script>
window.cke_wfpl_images = {
images: ~wfpl_images_json~,
+ full_width: ~wfpl_image_width_full~,
small_width: ~wfpl_image_width_small~,
thumb_width: ~wfpl_image_width_thumb~,
next_id: 0,
break;
}
code += '<div class="wfpl_i"'
- src = image.src;
+ src =
+ image.src.substr(0, image.src.length - 4)
+ + 'w'
+ + window.cke_wfpl_images[align == 'full' ? 'full_width' : 'small_width']
+ + image.src.substr(image.src.length - 4);
if (image.caption == '') {
caption = ' ';
} else {
caption = enc_html(image.caption);
}
- if (align != 'full') {
- src =
- src.substr(0, src.length - 4)
- + 'w' + window.cke_wfpl_images.small_width
- + src.substr(src.length - 4);
- }
code += ' style="background-image: url(/' + src + ');';
code += ' padding-top: ' + image.aspect;
code += '"> </div>' + caption;