$canvas->setImageFormat("png");
$canvas->setOption('png:compression-level', 9);
header("Content-type: image/png");
echo $canvas->getImageBlob();
Ну и в цикле возможно можно поиграть с качеством сжатия...пока картинка в JPEG ещё...
<div class="timer">
<p class="countdown-timer" data-d="7" data-h="16" data-i="43" data-s="51">
<span>
<i class="countdown-days">7</i>
<span>days</span>
</span>
<span>
<i class="countdown-hours">16</i>
<span>hrs</span>
</span>
<span>
<i class="countdown-mins">40</i>
<span>min</span>
</span>
<span>
<i class="countdown-secs">38</i>
<span>sec</span>
</span>
</p>
</div>
var timers = {};
$('.countdown-timer').each(function (index, timer) {
timers[index] = new easytimer.Timer();
timers[index].start(
{
countdown: true,
startValues: {
seconds: $(timer).data('s'),
minutes: $(timer).data('i'),
hours: $(timer).data('h'),
days: $(timer).data('d'),
}
});
timers[index].addEventListener('secondsUpdated', function (e) {
$(timer).find('.countdown-days').html(timers[index].getTimeValues().days);
$(timer).find('.countdown-hours').html(timers[index].getTimeValues().hours);
$(timer).find('.countdown-mins').html(timers[index].getTimeValues().minutes);
$(timer).find('.countdown-secs').html(timers[index].getTimeValues().seconds);
});
timers[index].addEventListener('targetAchieved', function (e) {
$(timer).html('EXPIRED');
});
});
function get_acf_field_values($field) {
global $wpdb;
$query = 'SELECT DISTINCT meta_value
FROM ' . $wpdb->postmeta. '
WHERE meta_key = "' . $field . '"
ORDER BY meta_value';
return $wbdb->get_col($query);
}