Support forums > Themes

Sakela theme: Issues with thumbnail size & mobile view

(1/1)

urmitnick:
Hello,

I'm using Sakela theme for my website.it's a great theme; but I have some issues to solve:

1- In the Latest ads section, the size of the preview is not equal for all the ads (see attached picture), it depends on the format of the picture (portrait / landscape) and its size. How can I make all the previews have the same size?

2- When I use the mobile view for this theme, comments section comes before seller informations. I want to reverse this order. What file should I edit?

Regards

urmitnick:
Any help please?

urmitnick:
Regarding the image thumbnail size, I figured out the source of the issue; when the image uploader creates the thumbnail taking in consideration the image size you put in media settings (eg.  240 x 200); it resizes the image according to the width (240) while keeping the aspect ratio which may lead in different height size from image to another.

where will can I find the script that resizes the image?

urmitnick:
in the ItemActions.php this part is responsible of creating the thumbnail:


--- Code: ---// Create thumbnail
                            $path = $tmpName."_thumbnail";
                            $size = explode('x', osc_thumbnail_dimensions());
                            ImageProcessing::fromFile($normal_path)->resizeTo($size[0], $size[1])->saveToFile($path, $extension);

--- End code ---

where size[0] is the width and size[1] is the height given in media settings (oc-admin).
 
And I think that the script doing this is in jquery.fineuploader.min.js but I can't figure out which part to change.

any help?

WEBmods:
Hello.

I think you just need some CSS.

Add this style to your latest ads img tag:


--- Code: ---    object-fit: cover;
    height: 250px;

--- End code ---

Change height as you wish. It will go from this:



to this:



Regards.

Navigation

[0] Message Index

Go to full version