Creating New Block Image(SOLVED)
Permalink
Hello
I'm trying to play a little with the creation of new Blocks and I made a copy of the Image Block that come with Concrete 5.7.2.1.
My question it's the following, how can I get the Image size of the original Image when I don't want make a Thumbnail? And how can I remove the PICTURE html tag? Do I really need go thru the process of creating a thumbnail to get this information and remove the picture tag?
view.php
Thank you very much.
..SOLUTION..
After update to 5.7.3.1 I never saw again this tag. Nice!!
I'm trying to play a little with the creation of new Blocks and I made a copy of the Image Block that come with Concrete 5.7.2.1.
My question it's the following, how can I get the Image size of the original Image when I don't want make a Thumbnail? And how can I remove the PICTURE html tag? Do I really need go thru the process of creating a thumbnail to get this information and remove the picture tag?
<?php defined('C5_EXECUTE') or die("Access Denied."); $c = Page::getCurrentPage(); if (is_object($f)) { if ($maxWidth > 0 || $maxHeight > 0) { $im = Core::make('helper/image'); $thumb = $im->getThumbnail( $f, $maxWidth, $maxHeight ); //<-- set these 2 numbers to max width and height of thumbnails $tag = new \HtmlObject\Image(); $tag->src($thumb->src)->width($thumb->width)->height($thumb->height); } else { $image = Core::make('html/image', array($f)); $tag = $image->getTag();
Viewing 15 lines of 32 lines. View entire code block.
view.php
Thank you very much.
..SOLUTION..
After update to 5.7.3.1 I never saw again this tag. Nice!!