Hi. We start to work with CGSmartimage in order to make pictures responsive.
In the help section we found: "... the module will look in its database for information about the maximum resolution of the requesting device. If that information cannot be found a remote web service will be queried for the resolution information. If suitable information can be found then the max_width and max_height parameters will be adjusted to rescale the image.
We tried to use the following tag to call the module:
{CGSmartImage src='uploads/images/news/Center-News/2014/1920x1080_DSC_0222.jpg' width='100%'}
...but it accepts no width='100%' .
Who knows how to use the module in order to scale the requested image to - for example - 90% of the content container size?
Thx x 1.000
MAP_1961
CGSmartimage - use a %-ual operation?
Re: CGSmartimage - use a %-ual operation?
Can you try using the parameter that just generates the URL and assign= to a variable?
Then you can use a regular image tag:
<img src="$TheImage" width="100%" alt="">
Then you can use a regular image tag:
<img src="$TheImage" width="100%" alt="">
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Re: CGSmartimage - use a %-ual operation?
Thx JohnnyB: we tried so. As soon as we use a piture call the way u proposed (regular image tag) cgsmartimage recognizes and changes the imput of 100% into 100pixels.JohnnyB wrote:Can you try using the parameter that just generates the URL and assign= to a variable?
Then you can use a regular image tag:
<img src="$TheImage" width="100%" alt="">
Thx anyway to be so kind to answer and think about a solution!
map_1961
Re: CGSmartimage - use a %-ual operation?
(optional) notag="" - Do not output an img tag, only the url to the cached image. This has no effect when CGSmartImage is used from within a stylesheet.
Code: Select all
<img src="{CGSmartImage notag="1" ... }" width="100%" ...>Re: CGSmartimage - use a %-ual operation?
Hi velden. We tried to solve like this. But using this hint no more use of the wysiwig editor is possible. This can not be a solution because few people are ablte to work on content in source code.velden wrote:(optional) notag="" - Do not output an img tag, only the url to the cached image. This has no effect when CGSmartImage is used from within a stylesheet.That's what JohnnyB meant I think.Code: Select all
<img src="{CGSmartImage notag="1" ... }" width="100%" ...>
Thx so far and for your all effort...
MAP_1961
Re: CGSmartimage - use a %-ual operation?
I don´t understand you±
What´s the difference? That code is not what you want your editors to add manually too isn't it?We tried to use the following tag to call the module:
{CGSmartImage src='uploads/images/news/Center-News/2014/1920x1080_DSC_0222.jpg' width='100%'}
...but it accepts no width='100%' .
Re: CGSmartimage - use a %-ual operation?
I think OP means the solution works technically but is not suitable because his editors wouldn't be able to implement the code change, he prefers a WYSIWYG solution?
Re: CGSmartimage - use a %-ual operation?
I'm not aware of an WYSIWYG implementation of CGSmartImage other then {cgsi_convert} which OP does not mention.paulbaker wrote:I think OP means the solution works technically but is not suitable because his editors wouldn't be able to implement the code change, he prefers a WYSIWYG solution?


