jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => General => Topic started by: chepp on 09.07.2023 01:28:18

Title: Adding Class to {file_pic}
Post by: chepp on 09.07.2023 01:28:18
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
Title: Re: Adding Class to {file_pic}
Post by: ColinM on 10.07.2023 01:24:14
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

Title: Re: Adding Class to {file_pic}
Post by: chepp on 10.07.2023 16:08:20
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
Title: Re: Adding Class to {file_pic}
Post by: Arno on 12.07.2023 10:43:13
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.