Jump to content

How to look for location of an image in css


Recommended Posts

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

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.

  • Like 1
Link to comment
Share on other sites

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 by Tanu (see edit history)
  • Like 1
Link to comment
Share on other sites

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 by Tanu (see edit history)
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...