CMS MADE SIMPLE FORGE

CGSmartImage

 

[#11377] {cgsi_convert} issues

avatar
Created By: adrien jaures (adrienj)
Date Submitted: Thu May 04 11:43:08 -0400 2017

Assigned To: Robert Campbell (calguy1000)
Version: 1.21.8
CMSMS Version: 2.1.6
Severity: Minor
Resolution: Fixed
State: Open
Summary:
{cgsi_convert} issues
Detailed Description:
Hello,
{cgsi_convert} don't work as expected
Tested in one template News::Sommary

For tests 1 to 3 $entry->fields.Visuel->value = <p><img
src="uploads/images/news-2017/metamorphosis-of-life-1.jpg" /></p>
metamorphosis-of-life-1.jpg original width=600px height=793px

*** Test 1 ***
{cgsi_convert alt="toto" quality='50'
filter_resize='w,300'}{$entry->fields.Visuel->value}{/cgsi_convert}
output is :
<img
src="https://www.exemple.com/uploads/_CGSmartImage/img-964923d3c8e6821e890b4e39f0b8cb35">
➔ img width=300 height=396 but alt tag is missing

*** Test 2 ***
{cgsi_convert alt="toto" quality='50'
max_width="400"}{$entry->fields.Visuel->value}{/cgsi_convert}
output is :
<img
src="https://www.exemple.com/uploads/_CGSmartImage/img-f96e0660061e724fb809fe145404073f"
width="400" height="528">
➔ img width=400 height=528 but alt tag is missing

*** Test 3 ***
{cgsi_convert alt="toto" quality='50' max_width="400"
noauto=1}{$entry->fields.Visuel->value}{/cgsi_convert}
output is :
<img
src="https://www.exemple.com/uploads/_CGSmartImage/img-eb8796a8742179d1781228af7fd606d1">
➔ img width=400 height=528 but alt tag is missing

*** Test 4 ***
Image is inserted with TinyMCE. Now $entry->fields.Visuel->value =
<p><img src="uploads/images/news-2017/metamorphosis-of-life-1.jpg?1493909628966"
alt="toto" width="600" height="793" /></p>

{cgsi_convert alt="toto" quality='50'
filter_resize='w,300'}{$entry->fields.Visuel->value}{/cgsi_convert}
output is : 
<img src="uploads/images/news-2017/metamorphosis-of-life-1.jpg?1493909628966"
alt="toto" width="600" height="793">
➔ cgsi_convert don't work, img isn't resized because one variable is added to
the image's name by the web server when development mode is active (no cache
mode) : metamorphosis-of-life-1.jpg?1493909628966

*** Test 5 ***
Image is inserted with TinyMCE but the variable is removed. Now
$entry->fields.Visuel->value =
<p><img src="uploads/images/news-2017/metamorphosis-of-life-1.jpg" alt="toto"
width="600" height="793" /></p>

{cgsi_convert alt="toto" quality='50' filter_resize='w,300'
noauto='1'}{$entry->fields.Visuel->value}{/cgsi_convert}
output is : 
<img
src="https://www.exemple.com/uploads/_CGSmartImage/img-335095ef6bae71c1fbe4eadc28375ce3"
alt="toto" width="600" height="793">
➔ img width=300 height=396 but noauto tag isn't applied


History

Comments
avatar
Date: 2018-11-03 11:02
Posted By: Robert Campbell (calguy1000)

Fixed in svn
      
Updates

Updated: 2018-11-03 11:02
resolution_id: 5 => 7

Updated: 2017-05-15 01:50
description: Hello, {cgsi_convert} don't work as expected Tested in one template News::Sommary For tests 1 to 3 $entry->fields.Visuel->value = <p><img src="uploads/images/news-2017/metamorphosis-of-life-1.jpg" /></p> metamorphosis-of-life-1.jpg original width=60 => Hello, {cgsi_convert} don't work as expected Tested in one template News::Sommary For tests 1 to 3 $entry->fields.Visuel->value = <p><img src="uploads/images/news-2017/metamorphosis-of-life-1.jpg" /></p> metamorphosis-of-life-1.jpg original width=60
resolution_id: => 5