News:

Looking for documentation? Take a look on our wiki

Main Menu

New idea for better optimization of image previews

Started by marvays, April 10, 2021, 07:27:28 AM

Previous topic - Next topic

marvays

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

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

Yes, but images are 350px  . . . I only resized images via css to 100px, but page load all images 350px big.

Jörgen

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

pinochico

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 for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

GJC Web Design

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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

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 for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

GJC Web Design

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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

Quotehe 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 for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

marvays

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

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Studio 42

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

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 for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products