Plugin-Image
Plugin-Image copied to clipboard
Image works on {{grid}}?
Hi!
I'm trying to use the image plugin to resize some images on a grid but it seems that the plug-in is not working.
Can u post your template code?
On Jan 29, 2013, at 5:49 PM, jolupa [email protected] wrote:
Hi!
I'm trying to use the image plugin to resize some images on a grid but it seems that the plug-in is not working.
— Reply to this email directly or view it on GitHubhttps://github.com/statamic/Plugin-Image/issues/3.
Here's the code. To pass the variable "imagen" to the image plug-in I try single and double braces with no results.
<div class="row">
<div class="twelve columns">
<ul class="block-grid six-up">
{{ entries:listing folder="videojuegos/galeria" limit="6" }}
{{ galeria limit="1" sort_by="random" }}
{{ image src="{{ imagen }}" dim="300x200#" }}
<li><img src="{{ image_src }}" width="{{ widht }}" height="{{ height }}" /></li>
{{ /image }}
{{ /galeria }}
{{ /entries:listing }}
</ul>
</div>
</div>
Make sure to use single braces on any variables used in parameters.
On Jan 29, 2013, at 8:10 PM, jolupa [email protected] wrote:
Here's the code. To pass the variable "imagen" to the image plug-in I try single and double braces with no results.
-
{{ entries:listing folder="videojuegos/galeria" limit="6" }}
{{ galeria limit="1" sort_by="random" }}
{{ image src="{{ imagen }}" dim="300x200#" }}
— Reply to this email directly or view it on GitHubhttps://github.com/statamic/Plugin-Image/issues/3#issuecomment-12868538.
Ok. Changed all the variables to single bracees... nothing happens.
<div class="row">
<div class="twelve columns">
<ul class="block-grid six-up">
{{ entries:listing folder="videojuegos/galeria" limit="6" }}
{{ galeria limit="1" sort_by="ramdon" }}
{{ image src="{ imagen }" dim="300x200#" }}
<li><img src="{ image_url }" width="{ widht }" height="{ height }" /></li>
{{ /image }}
{{ /galeria }}
{{ /entries:listing }}
</ul>
</div>
</div>
Just the ones inside parameters. e.g. {{ image src="{ imagen}" }}
On Jan 29, 2013, at 8:20 PM, jolupa [email protected] wrote:
Ok. Changed all the variables to single bracees... nothing happens.
— Reply to this email directly or view it on GitHub.{{ entries:listing folder="videojuegos/galeria" limit="6" }} {{ galeria limit="1" sort_by="ramdon" }} {{ image src="{ imagen }" dim="300x200#" }}
- {{ /image }} {{ /galeria }} {{ /entries:listing }}
Changed... still not working.
does {{ imagen }} give you a valid image path?
On Jan 29, 2013, at 8:32 PM, jolupa [email protected] wrote:
Changed... still not working.
— Reply to this email directly or view it on GitHub.
Yes, if I remove the call to the image plug-in the images shows on the page, but without the dimensions I want.
Have you tried the Image plugin that ships with Statamic? I can't remember if this repo is ahead of that or not at this point.
On Jan 29, 2013, at 8:35 PM, jolupa [email protected] wrote:
Yes, if I remove the call to the image plug-in the images shows on the page, but without the dimensions I want.
— Reply to this email directly or view it on GitHub.
I'm using the one coming with statamic. In the same page I'm using the plug-in to resize another image, from a file fieldtype not a grid, without a problem.
I see a few typos (e.g. sort_by="ramdon") and {widht} -- can you make sure they're not affecting anything? On Jan 29, 2013, at 8:42 PM, jolupa [email protected] wrote:
I'm using the one coming with statamic. In the same page I'm using the plug-in to resize another image, from a file fieldtype not a grid, without a problem.
— Reply to this email directly or view it on GitHub.
Ok. Fixed the typos. Not working.
Checking the HTML for the page is not rendering the
<li>...</li>
tags (or other tags I put inside the {{image}}...{{/image}}
Uf! I can't find the problem...
If a put this code
´´´
Galería
Galería
I haven't had any luck with the image plugin either. I've tried everything. I'm sure there's something about it that I'm missing...
It outputs the HTML with the tags around the img src so it can't find the image.
<img src="{/assets/img/news/new-site.jpg}" width="111" height="111">
Instead of using my variable { post_image } I tried the url where my images are uploaded and I get a Slim Application Error with the problem on line 58 of the plugin's php file.
Had the same issue. First of all, make sure that there are images written in cache. I removed em and then added double brackets everywhere: worked. Here's the code that worked for me, sorry for the shitty indentation.
{{ galerie_grid limit="200" }}
{{ image quality="80" src="{{ galerie_image }}" dim="400x200>" }}
<img src="{{ image_url }}" width="{{ width }}" height="{{ height }}"/>
{{ /image }}
{{/galerie_grid}}