News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Image uploads: file_title corrupted with random number

Started by Margriet, January 19, 2026, 11:59:30 AM

Previous topic - Next topic

Margriet

Hello,
I'm experiencing a systematic image upload issue with VirtueMart 4.6.4 on Joomla 5.4.2, confirmed across multiple independent installations on different servers/hosting providers.
Problem Description:
When uploading product images, the file_title field in the #__virtuemart_medias table gets corrupted by having a random number appended after the file extension.
Examples:

  • EM1B8765-2147x1006.jpg becomes EM1B8765-2147x1006.jpg_16467
  • P9140313.webp becomes P9140313.webp_2251 (media_id 2927)
  • SAM_3458.jpg becomes SAM_3458.jpg_1

Additional Issues:

  • file_is_product_image is incorrectly set to 0 instead of 1 on upload
  • file_url remains correct (no corruption)
  • Thumbnails generate successfully with correct filenames
  • Images display correctly on frontend despite the corruption
  • Backend media list shows the corrupted file_title

Environment:

VirtueMart: 4.6.4 (11226)
Joomla: 5.4.2
PHP: [8.3]
Confirmed on multiple installations, different servers and hosting companies

Database Evidence:
SELECT virtuemart_media_id, file_title, file_url, file_is_product_image
FROM #__virtuemart_medias
WHERE file_type = 'product'
ORDER BY virtuemart_media_id DESC
LIMIT 10;
Results show file_title with incorrect extensions and file_is_product_image = 0.
Temporary Workaround:
Running these queries periodically to fix corrupted records:
Fix file_is_product_image
UPDATE `#__virtuemart_medias`
SET `file_is_product_image` = 1
WHERE `file_type` = 'product'
AND `file_mimetype` LIKE 'image/%'
AND `file_is_product_image` = 0;

-- Fix corrupted file_title
UPDATE `#__virtuemart_medias`
SET `file_title` = REGEXP_REPLACE(`file_title`, '\\.(jpg|jpeg|png|gif|webp)_[0-9]+$', '.$1')
WHERE `file_title` REGEXP '\\.(jpg|jpeg|png|gif|webp)_[0-9]+$'
AND `file_type` = 'product';
Questions:

  • Is this a known issue with VirtueMart 4.6.4 and Joomla 5.4.2?
  • Is there a fix or update planned?
  • What could be causing the random number suffix in file_title?

Any guidance would be greatly appreciated. This affects thousands of product images across multiple stores.
Thanks in advance for your help!