News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Adding Class to {file_pic}

Started by chepp, 09.07.2023 01:28:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chepp

I am using a plug in called SmartResizer. To prevent SmartResizer from resizing the file type picture I need to add 'class="nosmartresize"' to the img tag. I've tried adding a class to a div or span around {file_pic} in the layouts without success. I looked at overrides as well, but I'm not seeing a means to modify the img tag. Is there a way to insert a class into an img tag?

Joomla 4.3.2, jDownloads 4.0.28

Thanks
  •  

ColinM

Hi

jDownloads  has settings for automaticaly resizing images built in
See for example the article
https://www.jdownloads.net/documentation/faq-v3-9/adding-images-to-a-download

Colin

Colin M
  •  

chepp

I'm not trying to resize images, I'm trying to prevent it. I have the file type icon on in the layout (pdf.png, doc.png, txt.png, mp3.png, etc.). The other plugin is creating a thumbnail of all those icons. To prevent those thumbnails I need to add 'class="nosmartresize"' to the img tag. The layout uses the {file_pic} tag to add the icon to the layout. If I add the class to the img tag the plugin won't create a thumbnail. How can I add a class to the thumbnail image?

Thanks
  •  

Arno

Hi,
QuoteI looked at overrides as well, but I'm not seeing a means to modify the img tag. Is there a way to insert a class into an img tag?
Yes, this should be possible. Have you tried this on the pic below?
Only an example.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •