Slider resizes images

Permalink
Hello,

I'm just getting my feet wet with Concrete5 and the first issue I've run into is that, when I attempt to add a new slide, it makes my 630 pixel-wide image much wider, causing the image to appear pixelated. I've tried reducing the size of the image in photoshop prior to uploading it and I've also tried the options menu where there's an option for "Maximum Slide Width (0 means no limit)." I've tried setting this as low as 100 and it has no effect. My image still comes out larger than the original image. Any help would be greatly appreciated.

 
ob7dev replied on at Permalink Reply
ob7dev
Nice catch, its a bug in the script code rendered by c5. Check it out:
<script>
$(document).ready(function(){
    $(function () {
        $("#ccm-image-slider-<?php echo $bID ?>").responsiveSlides({
            prevText: "",   // String: Text for the "previous" button
            nextText: "",
            <?php if($navigationType == 0) { ?>
            nav:true,
            <?php } else { ?>
            pager: true,
            <?php } ?>
            <?php if ($timeout) { echo "timeout: $timeout,"; } ?>
            <?php if ($speed) { echo "speed: $speed,"; } ?>
            <?php if ($pause) { echo "pause: true,"; } ?>
            <?php if ($noAnimate) { echo "auto: false,"; } ?>

The bug is the last part where it says echo "maxWidth"
The plugin behind this ishttp://responsiveslides.com/
It states the option is suppose to be "maxwidth", not maxWidth".

Change the W to a lowercase and it will work. The file is found at /concrete/blocks/image_slider/view.php line 24.

It's already been fixed in the development branch (https://github.com/concrete5/concrete5/blob/develop/concrete/blocks/image_slider/view.php), so the fix should be included in the next stable release of concrete5.
bgrizzard replied on at Permalink Reply
Hey thank you very much for this. I'm afraid I'm not much of a coder. Where would I go to change this?

Also, I found a work around by creating an image to match the size of the underlying area, which is 1100x368 pixels. I simply merged my correctly-sized image into a full-sized background image.
ob7dev replied on at Permalink Best Answer Reply
ob7dev
You will need to edit the file directly somehow. If you have FTP access to your hosting, you would need to gain access to that, then find the file:
concrete/blocks/image_slider/view.php

Download it, make the change, then upload it back to this location.

Let me know if you need anymore help.

Thanks,
David