Why not just images?

Media is primarily for the management of images but VirtueMart recognises that a much wider range of media types are required to be handled within your ecommerce store, such as pdf's, textfiles, archives, videos or even music. This gives you a far more structured and manageable approach to handling your media files and helps remove the cumbersome practice of having to manually including these files in content descriptions.

You should see the advantage of the support for a wide range of media should you need to add Product documentation such as user-guides or technical manuals. Access to such information can have a positive impact on the shopper experience.

The VirtueMart media library, is more than a simple pointer to a file. Files handled in the Media database have additional properties that you can set, such as:-

  • The media name
  • A title
  • Alt-Text description
  • CSS class
  • The purpose/role

A single Media file/entry can be used multiple times across multiple areas of your store.

Example:-

If you have a number of products for which a single image can be re-used

The single Media entry is associated to these multiple products

If, in the future, you decide you want to have a better image, you simply change the attached file(image) in the Media entry and all products will show this new image, without any further work on your part.

Note: This approach can be used for all Media types.

When reviewing the Media files you can find an image using the "Filter Name" field. To browse all files leave the "Filter Name" blank and hit "Go".

Folders

For the main Media category types there is a separate folder. This helps organise your media, you cannot use a media across differing Media category types e.g. If the Media is in the "products" folder it cannot be used for display in categories.

There are 4 main folders:-

  • category
  • manufacturers
  • products
  • vendor

Other media folders exist:-

Shipment and payment:- These are for storing logos/images to be used by shipment and payment plugins (if supported by the plugin) These are uploaded by ftp or with joomla.

"forSale" is only for thumbnails of the medias, which are uploaded to the safepath and is meant for media that you are selling as products. If nothing is uploaded an icon for the filetype is displayed. Only a few are delivered within the normal installation. They can be uploaded to:-

/components/com_virtuemart/assets/images/vmgeneral

They must be named "filetype_ext". Replace the "ext" with the relevant extension that should use the icon
e.g. "filetype_pdf", "filetype_zip".

Automatic Thumbnailing

Smaller images can greatly reduce page load times and create a consistent look for your pages (such as product browse pages and product detail pages). This can significantly improve the shopper experience.

You can provide separate thumbnails for media files if required, but to save you time and effort VirtueMart can generate these automatically if you do not supply an alternative image for the thumbnail.

Thumbnails are generated automatically if the configuration "Dynamic Thumbnail resizing" is set to ON

Within the database the name and path of a thumbnail is only stored when you specify it. Dynamic thumbnail image names and paths are not stored).

The default location for thumbnails is releated to attributes of the media.

When the length or the width for thumbnails is not set in the VirtueMart configuration, then the relative proportions are kept. The installation thumbnail default is set to 90px height, so the width is adjusted proportionately.

More about different thumbnail sizes http://docs.virtuemart.net/tutorials/templating-layouts/222-different-thumbnail-sizes.html

Uploaded full sized images are not resized/optimised. The best practice approach is to resize/optimise images (for example shot by a camera) before they are uploaded. Two useful programs that can help in this are:-

http://www.irfanview.de/ This has batch processing features.

Also very good, maybe even better, https://imageoptim.com/

Synchronise Media

Uploading all images via FTP is a lot faster and easier than adding them one at a time using the admin interface. In addition, it is possible to use subfolders via FTP. The thumbnails keep the folder structure, so if VirtueMart is managing the thumbnails for you, it is enough to delete the "resized" folder.
Example:- there is the folder structure /product/tools and /product/materials, the thumbnails are for the main images are stored in /product/resized/tools and /product/resized/materials.

The name, description just takes the filename. To reduce the synchronisation time use lowercase for the file extensions jpg, png, pdf rather than JPG,Jpg, Png PNG, PDF.

Images, Invoices and TCPDF

TCPDF is used to create the PDF invoices, however it is "sensitive" to images. If there is a problem with the invoice creation, check that images used in the invoice are compatible with TCPDF.