- Posts: 111
COMMUNITY FORUM
Can we turn OFF Image Dimensions being displayed?
- Sean Carney
- Topic Author
- Offline
- Premium Member
Less
More
12 years 2 months ago #100710
by Sean Carney
Can we turn OFF Image Dimensions being displayed? was created by Sean Carney
Can somebody let me know how to make the K2 images that are created and displayed work with responsive templates?
I see that the code generated by K2 now is creating width tags. We need to not display the width and height in order to work with responsive templates.
Here is a sample of the code now:
<img style="width:360px; height:auto;" alt="Seagull Soaring in the Fresh Air" src="/media/k2/items/cache/c10c64c27e0606d1654b81b9bb482558_L.jpg">
I use the JCE editor and have just learned that we can set a parameter in each 'profile' in
plugin parameters -> Image Manager
to be "Always Include Dimensions" = "No" in order to NOT display image dimensions in our joomla content for articles created with JCE. This will make the images work with responsive designs.
Can we do the same thing with the K2 images gets uploaded for each article?
I would like to have the image sizes be served at the correct size the way K2 works so well but then to define width and heights.
Thank you, Sean Carney
I see that the code generated by K2 now is creating width tags. We need to not display the width and height in order to work with responsive templates.
Here is a sample of the code now:
<img style="width:360px; height:auto;" alt="Seagull Soaring in the Fresh Air" src="/media/k2/items/cache/c10c64c27e0606d1654b81b9bb482558_L.jpg">
I use the JCE editor and have just learned that we can set a parameter in each 'profile' in
plugin parameters -> Image Manager
to be "Always Include Dimensions" = "No" in order to NOT display image dimensions in our joomla content for articles created with JCE. This will make the images work with responsive designs.
Can we do the same thing with the K2 images gets uploaded for each article?
I would like to have the image sizes be served at the correct size the way K2 works so well but then to define width and heights.
Thank you, Sean Carney
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
12 years 2 months ago #100711
by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Can we turn OFF Image Dimensions being displayed?
I've used this before and it helps :)
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- Sean Carney
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 111
12 years 2 months ago #100712
by Sean Carney
Replied by Sean Carney on topic Re: Can we turn OFF Image Dimensions being displayed?
thank you very much.
are you aware of any way to just tell K2 not to use width tags? ie. to make them all auto?
are you aware of any way to just tell K2 not to use width tags? ie. to make them all auto?
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
12 years 2 months ago #100713
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: Can we turn OFF Image Dimensions being displayed?
Hi. You can do this in your template. Make a K2 template override and just remove the lines that are outputing the width attribute.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Sean Carney
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 111
12 years 2 months ago #100714
by Sean Carney
Replied by Sean Carney on topic Re: Can we turn OFF Image Dimensions being displayed?
Thank you very much. Will do! :-)
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
12 years 2 months ago #100715
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: Can we turn OFF Image Dimensions being displayed?
You are welcome.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.