K2 item view image is always 726 wide

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Jul 12, 2012 4:41 am
Reply with quote
Report this post
I am fumbling about trying to get a handle on K2 settings with limited knowledge, and am also working with my first GavickPro template. Oh, and it's my first responsive design template!

My problem is that on all K2 items in Item View, the image is being stretched to the "Item generic image width" of 726px as set in K2 paramaters.

How do I get K2 to display a small version of the image in Item View for some items?

I have tried setting the Category Item View Options so that the image size is small (set to 200px). (I know the Category Item View Options are working, because I can set Image=Hide and the image is hidden.

I have tried also setting the image size to small in the Item > Item View Options.

But still the image always gets stretched to 726px.

Am I missing something?
User avatar
Fresh Boarder

teitbite
Mon Jul 16, 2012 4:21 pm
Reply with quote
Report this post
Hi

Please show me an exact page where You have this problem.
User avatar
Moderator

GK User
Mon Sep 17, 2012 11:44 pm
Reply with quote
Report this post
Has there been a solution to this issue cause I'm having the exact same issue. I've created a new category in K2 and entered my own images sizes but the image is always showing as 726px width.
User avatar
Fresh Boarder

teitbite
Tue Sep 18, 2012 10:36 am
Reply with quote
Report this post
HI

Sorry. I have not seen a page with this, so could not egzamine where is this wight setting comming from. Can You provide it ?
User avatar
Moderator

GK User
Tue Sep 18, 2012 11:29 am
Reply with quote
Report this post
trying to create a K2 category page. I've created a category and given the small image a size of 100px but the image still gets rendered as 726px wide. All the images are being rendered as that size. Here is the page:

http://204.12.28.40/~tamfit/index.php/stuff

Let me know if this helps.
User avatar
Fresh Boarder

teitbite
Tue Sep 18, 2012 12:04 pm
Reply with quote
Report this post
Hi

Image is being resized to cover the width of a space. This is kind of a responsive template thing. To override it You can make a layer around the image and set the width there. In Your case You can already use this code:

Code: Select all
.itemImageBlock {
    float: left;
    width: 100px;
    margin: 0 15px 15px 0;
}
User avatar
Moderator

GK User
Tue Sep 18, 2012 3:59 pm
Reply with quote
Report this post
I understand the responsive template thing but in the Fashion template demo on their category blog page the images there are showing fine. They are resized. If I use your code it will hard code the size and it won't be responsive. Am I not correct here?

Thanks for your help so far.
User avatar
Fresh Boarder

teitbite
Wed Sep 19, 2012 7:25 am
Reply with quote
Report this post
Hi

I've used 100px because it's too small to affect responsive.

Anyway I've found where this can be changed. Looks like it's all a K2 style which is designed that image should cover full width of a column. To remove this please edit /templates/gk_fashion/css/k2.css (line 74):

Code: Select all
.itemImageBlock img {
    -moz-transition: all 0.3s ease 0s;
    height: auto;
    max-width: 100%;
    width: 100% !important;
}


and remove this line:

Code: Select all
width: 100% !important;
User avatar
Moderator

GK User
Wed Sep 19, 2012 4:32 pm
Reply with quote
Report this post
Awesome, that was it.

Thanks
User avatar
Fresh Boarder


cron