Blog: Images in Slideshow Minimum Width

58 views
Skip to first unread message

David Blumenfeld

unread,
Feb 24, 2011, 10:07:11 PM2/24/11
to apostrophenow
Hey guys,

I'm fairly new to Apostrophe version 1.4.1, and I was having trouble
using images in the blog. Whenever I try adding an image to media, it
says that it will only display images with a minimum width of 680
pixels. I saw that there was another post about this as well, where
someone recommended overriding the minimum width in
__singlecolumntemplate. I did this in the following code:
'aSlideshow' => array("width" => 480, "flexHeight" => true,
'resizeType' => 's', 'constraints' => array('minimum-width' => 480))
However, it is still telling me that I can only see images with a
minimum width of 680 pixels. Any suggestions as to how I can fix this?

Thank you,
David Blumenfeld

Tom Boutell

unread,
Feb 25, 2011, 8:46:41 AM2/25/11
to apostr...@googlegroups.com
You should use Apostrophe 1.5. Especially if you are "fairly new" and
thus not married to 1.4. Please, don't suffer, we fixed so much (:

Your override looks okay, where did you put it?

--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

David Blumenfeld

unread,
Feb 26, 2011, 5:29:33 PM2/26/11
to apostrophenow
I'd switch to the newer version but I'm pretty late in the development
process and don't want to switch over. I put it in
__singlecolumntemplate.php, is that the right place to put it?

David Blumenfeld

unread,
Feb 27, 2011, 2:11:43 AM2/27/11
to apostrophenow
Ok so I upgraded to apostrophe 1.5, and I put the following code in
__singlecolumntemplate.php:
'aSlideshow' => array("width" => 480, "flexHeight" => true,
'resizeType' => 's', 'constraints' => array('minimum-width' => 480)),
And it still will not let me post images with a width less then 680
pixels. Any suggestions?

Thanks,
David Blumenfeld

On Feb 26, 2:29 pm, David Blumenfeld <david.h.blumenf...@gmail.com>
wrote:

Alex B

unread,
May 8, 2012, 12:16:06 PM5/8/12
to apostr...@googlegroups.com
Any solutions to this? I can, using _singleColumnTemplate.php, change the fixed image size, but what I'm after is to prevent forced resizing of images in the blog: I understand why this is useful for the slideshow, but it's not good for posting pictures in blog posts, as I don't necessarily want them all to be the same size. Also, modifying the 'constraints' array seems to make no difference.

Cheers,
Alex

Arturs Jansons

unread,
May 21, 2012, 8:16:08 AM5/21/12
to apostr...@googlegroups.com
"width" was hardcoded in cropping action. We have trouble with aMedia module and its uploading and showing process. Somewhere we just use original image with "max-width:100%", so it`s automaticly resizes as inherited container.

Also checkout app.yml for:

      somePlugin
        slideshowOptions:
          width: 200
      aImage:
        width: 675

In template:
<?php $width = isset($width) ? $sf_data->getRaw('width') : 480; ?>
...
<?php a_area($name, array_merge(array(
...
  'aSlideshow' => isset($slotOptions['aSlideshow']) ? $slotOptions['aSlideshow'] : array(
    'width' => $width,
    'height' => $height,
Reply all
Reply to author
Forward
0 new messages