Tanu Posted June 14, 2013 Share Posted June 14, 2013 Hi there I am trying to find location of an image in css I can't find it I am trying to change the size of the image in a category but through preference - images it is not happening even after I tried regeneration but when I right clicked the image and clicked on inspected element I could see it's width and height mentioned but not the location or it's path Here I am able to make the changes in sizes but I need to find the location through host control panel. I have checked both global css and category.tpl but cannot find the actual location here is the link of the category you can see how distort image is http://folkvilla.com/mypresta/index.php?id_category=13&controller=category So can anyone tell me how to go about it????????? Thanks Link to comment Share on other sites More sharing options...
vekia Posted June 14, 2013 Share Posted June 14, 2013 go to the category.tpl file located in your theme directory you've got there something like: <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> i think that you've got width & height values hardcoded there, check this file and code please in your category.tpl file. 1 Link to comment Share on other sites More sharing options...
Tanu Posted June 14, 2013 Author Share Posted June 14, 2013 (edited) go to the category.tpl file located in your theme directory you've got there something like: <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> i think that you've got width & height values hardcoded there, check this file and code please in your category.tpl file. Thank you so much Vekia again you rescued me Yes I found that line in category.tpl and made changes You are simply great But I am getting white patches above the picture and below it I guess I will have to use PNG images for transparency but can't I use jpeg files they are easy actually I am reading a lot in forums some is getting into my head but rest is just passing it still I am confident that I will be able to pull a good website for myself here take a look at the picture please http://folkvilla.com/mypresta/index.php?id_category=13&controller=category Edited June 14, 2013 by Tanu (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted June 14, 2013 Share Posted June 14, 2013 it's because your image doesn't fit to the size, defined in the back office under the preferences > images tab. Make sure that you uploading image with exactly the same size as you defined 1 Link to comment Share on other sites More sharing options...
Tanu Posted June 15, 2013 Author Share Posted June 15, 2013 (edited) Yes Thanks Vekia I understand but all my pictures have different sizes and Prestashop keeps only one size for the category and one size for products though I have kept the height of all the pictures 700 px according to Photoshop but I cannot control the width of piks if I did that then all the piks would get un-proportionate. Is there no way I can apply all sorts of sizes for products at least for categories I will choose those piks only that are of same sizes but for products it's impossible Edited June 15, 2013 by Tanu (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 15, 2013 Share Posted June 15, 2013 i don't understand well, but: 1) you can upload separate photo file for categories 2) you can upload separate photo file for products so, where the problem is? Create separate images with different dimensions and upload them separately. 1 Link to comment Share on other sites More sharing options...
Tanu Posted June 15, 2013 Author Share Posted June 15, 2013 Thanks Vekia Create separate photo file? I don't know about that? I am not sure how to do that? The problem is when I try to upload different pictures with different dimentions they don't show exactly as they should but they get stretched because I have set the sizes through preference < Images - which are common for all images set in category or products and I pictures of all sorts of dimensions portrate sizes as well as landscape sizes Link to comment Share on other sites More sharing options...
Tanu Posted June 15, 2013 Author Share Posted June 15, 2013 Here take a look at this link http://folkvilla.com/mypresta/index.php?id_category=21&controller=category&orderby=price&orderway=asc All look stretched I think I am doing something wrong or not doing something there is a link missing somewhere which I am not getting Link to comment Share on other sites More sharing options...
Bob Wagstaff Posted June 16, 2013 Share Posted June 16, 2013 (edited) The easiest way is to ensure that all your category or product pictures are in the same proportion is to ensure this before you upload them. I use GIMP 2.6 to achieve this, which is free software. Edited June 16, 2013 by Bob Wagstaff (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now