Author Topic: New idea for better optimization of image previews  (Read 1793 times)

marvays

  • Jr. Member
  • **
  • Posts: 422
    • richta.cz
  • Skype Name: marvays
New idea for better optimization of image previews
« on: April 10, 2021, 07:27:28 am »
In the VM settings, I choose an image preview size that is good for previewing a product or category. But it's not such a good solution for the manufacturer's logo. In my e-shops, I usually have the size of the preview of product images 350px, category 350px, but the size of the manufacturer's logo is 100px.

When I want to optimize the logo and create a perfect compressed image with a size of 100pc, the VM forcibly enlarges it to 350px according to the VM settings. And all optimization is in ****.

I suggest modifying the VM so that the administrator can set the thumbnail sizes as needed according to his template for each type separately. Separately for the product, separately for the category and separately for the manufacturer.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4489
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: New idea for better optimization of image previews
« Reply #1 on: April 10, 2021, 12:59:35 pm »
You can modify the size in the front layout files
Search for displayMediaThumb
For eg. In file /components/com_virtuemart/views/manufacturer/tmpl/default.php
$manufacturer->images[0]->displayMediaThumb("",false);
replace with
displayMediaThumb("",false,"",rue, false,false,100,100);
to restrict the size to 100X100px
Of course, it's better to copy the file in your template overrides

marvays

  • Jr. Member
  • **
  • Posts: 422
    • richta.cz
  • Skype Name: marvays
Re: New idea for better optimization of image previews
« Reply #2 on: April 11, 2021, 18:16:43 pm »
Yes, but images are 350px  . . . I only resized images via css to 100px, but page load all images 350px big.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3672
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: New idea for better optimization of image previews
« Reply #3 on: April 11, 2021, 18:39:34 pm »
????

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1207
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: New idea for better optimization of image previews
« Reply #4 on: April 11, 2021, 18:44:28 pm »
It's normal, if you don't change php as write Patrick.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10253
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: New idea for better optimization of image previews
« Reply #5 on: April 11, 2021, 22:15:35 pm »
The solution is obvious ..  make the logo 350px by adding some whitespace to the image canvas
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1207
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: New idea for better optimization of image previews
« Reply #6 on: April 11, 2021, 23:52:18 pm »
The solution is obvious for developers, yes.

But for SEO is best create small size, then 100x100px is ok.
However, they must be able to set up and use the function correctly to create a preview from the original size. (as wrote Patrick).
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10253
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: New idea for better optimization of image previews
« Reply #7 on: April 12, 2021, 10:11:13 am »
It isn't obvious to me what he his asking?  Is he showing the manu logo along with the product or is he discussing the manu page with a displayed logo @ 100px?

if so then yes .. he has to do as Patrick described
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1207
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: New idea for better optimization of image previews
« Reply #8 on: April 12, 2021, 10:50:49 am »
Quote
he discussing the manu page with a displayed logo @ 100px?

Yes, he want the logo manufacturer in size 100x100px, not in size from defult size 350px (without setup in admin).
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

marvays

  • Jr. Member
  • **
  • Posts: 422
    • richta.cz
  • Skype Name: marvays
Re: New idea for better optimization of image previews
« Reply #9 on: April 12, 2021, 11:52:06 am »
In the administration I can enter "Thumbnail Image Width" and Thumbnail Image Height.

For perfect SEO I would like to be able to set up separately:
- Thumbnail category Image Width
- Thumbnail product Image Width
- Thumbnail Manufacturer logo Image Width
- and maybe something like Thumbnail categories Images Width

I'm adding samples from the web, where I have a different size for each type of image. But I only have one size saved on ftp. Here from the VM settings.

I would achieve that I will have different image previews depending on how I have set it up in the template. So if I have set the manufacturer's logo to 80px, the VM will produce a preview of 80px and save it on ftp. The template will then display this image and may not shrink it. This will make it faster.

However, it achieves far better results with category and product images. Yes, I can edit the manufacturer's logos manually and upload to ftp, but over time, the thumbnails may be overwritten again.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10253
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1207
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: New idea for better optimization of image previews
« Reply #11 on: April 12, 2021, 12:47:22 pm »
Thanks GJC for doc
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4489
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: New idea for better optimization of image previews
« Reply #12 on: April 15, 2021, 23:57:07 pm »
YOu can have different size for different needs.
For eg a specific size in the modules, in the cart, in the category page, in the manufacturers. For related products, slideshows ...
So adding this as option in the config ????

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1207
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: New idea for better optimization of image previews
« Reply #13 on: April 16, 2021, 11:51:51 am »
Logic:
- 2 size in admin (or config)
- others size as call function in override view
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates