lundi 2 mars 2015

jQuery cycle2 thumbnail image size

I'm using the cycle2 plugin and automatically generating the thumbnails using the pager-template and the mustache {{src}} mark up to use the image source as the thumbnail, this works fine but I'm now loading in a 1000px image twice for every image in the slider which is pretty bad!, my images are all marked up with '-1000' as part of the file name what I really want to do is replace this part of the image file name for the thumbnail source with '-200' to load the 200px images for the thumbnails, thus I'm loading one 1000px image for the main image and just a 200px image for the thumbnail, but can't figure it out. Does this make sense, I'm thinking correctly?


Aucun commentaire:

Enregistrer un commentaire