Chris 2pha Brown. Drupal developer Brisbane Australia

Chris Brown

Drupal, Javascript, Three.js, 3D

website blog

javascript stuff

image for Gulp imagemin with the pngquant plugin

I found it hard to find an example of how to use gulp-imagemin with a plugin, specifically in my case, the imagemin-pngquant plugin.The difference seen between using compressing a .png with the default compressor that is included in gulp-imagemin and pngquant was substantial.I was converting a 100px x 100px 21.3KB .png. The png compressor that comes with gulp-imagemin (optipng) produced a file.....

image for Javascript snippet for "jump to" functionality in Owl Carousel

Putting this here for my own future reference.It adds an input textfield under an owl carousel (2.0.0-beta.2.4) to jump to a certain item.Dots must be on to use the "to" method.It also includes some stuff for lazy loading as it did not seem to work when using the "to" method of the OwlCarousel. var container = $('.view-collection-item-viewer-new .view-content', context); var carousel = container.....