News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

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!
  •