CGSmartImage: photo not shown in FireFox

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

CGSmartImage: photo not shown in FireFox

Post by Gregor »

Hi,

I have a UDT for showing photo's in a blog post. It uses CGSmartImage. In Chrome and Safari this works fine, the photo's are shown, however I was notified that in Firefox (my version is 58.0.2) they don't show up. Latest versions of cmsms and CGSI are used.

By looking in debug mode, I notice FF doesn't show the processed image. Only the title of the photo and the test to expand the picture are shown.

Link to a post example: https://www.uisge-beatha.eu/2018/03/Exp ... nstalleren

The code of the UDT:

Code: Select all

// Settings
// {foto file="folder/fotonaam.jpg" title="title" side="right | left"}
// Een voorbeeld:
// {foto file="Gallery/Zomer2015/Vakantie 2015/Vakantie 2015 - 52.jpg" title="Helemaal rond" side="left"}
//
// Defaults parameters
$smartimage = cms_utils::get_module('CGSmartImage'); // make sure the module is loaded
$cgblog = cms_utils::get_module('CGBlog');  // changed this line.
$gCms = cmsms();
// var_dump($cgblog);
$image_heigth = 170;
$large_size = 640;
$path = 'uploads/images/';
// $path = isset($params['file']) ? $params['file'] : 'uploads/images';
$noremote = '0';
$noembed = '0';
$action = 'responsive';
$notag = '0';
/* CGBlog article related  (string) */
$cgblog_id = isset($params['cgblog_id']) ? $params['cgblog_id'] : '436'; //random number
//
// Get Params
$image_width = isset($params['width']) ? $params['width'] : '120';
$file = isset($params['file']) ? $params['file'] : '';
$title = isset($params['title']) ? $params['title'] : 'Uisge Beatha';
$alt = isset($params['title']) ? $params['title'] : 'alt="Uisge Beatha, Zeilen, Watersport"';
$side = isset($params['side']) ? $params['side'] : 'left';
$path_no_spaces = str_replace(' ', '%20', $path);
$pathfile = $path_no_spaces . $params['file'];
$image_no_space = str_replace(' ', '%20', $pathfile);
//
// build an array of params, same as the module accepts
$params = array();
// $output = array();
$params['src'] = $pathfile;
$params['width'] = $image_width;
$params['height'] = $image_heigth;
$params['action'] = $action;
$params['alt'] = $alt;
$params['notag'] = $notag;
$params['noremote'] = $noremote;
$params['noembed'] = $noembed;
//
$outp = cgsi_utils::process_image($params);
//
// echo $outp;
$image = $outp['output'];
//
// echo $image;
// {CGSmartImage title={$entry->title} alt={$entry->title} src1=$path src2=$image filter_croptofit='400,250,c'}
// The html code
//
echo("<div class=\"floatbox_$side floatbox\" data-fb-options=\"group:cgblog-$cgblog_id header:#socialmediashare1\">");
     echo("<a class=\"floatbox\" href=\"$image_no_space\"> $image</a>");
     if ($title) {
          echo("<span class=\"cgblog_image_title\">$title</span>");
          // echo("$bar");
     }
     echo("<span class=\"cgblog_image_c2e\">(klik voor grote foto)</span>");
echo("</div><p>");
Been playing around with the 'noembed' and 'notag', but that doesn't seem to solve the problem.

Someone who can help me out?

Thanks in advance.
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

SOLVED Re: CGSmartImage: photo not shown in FireFox

Post by Gregor »

Found by coincidence the solution in the bug area of CGSI:
"noresponsive=1"
Post Reply

Return to “Modules/Add-Ons”