Prevent image resize on one image?

lunky84
12 years, 5 months ago
Is it possible to stop image resize on only one image, maybe by adding a class to the image for example?

I have used an image on the homepage of my site that I don't want to resize. Due to the way the site is designed the image has to be in the HTML and cannot be a background CSS image.

I've also tried replacing the auto generated resized file with the original and updating the name but the file simply gets regenerated and overwrites it.
dryabov
12 years, 5 months ago
It's not implemented because of there was no such requests previously. But actually it can be easily done with simple patch. In your case you could edit administrator/components/com_mobilejoomla/classes/imagerescaler.php and add a check in imageParsing function, smth like

 
static function imageParsing($matches)
{
$text = $matches[1];
/* patch */ if (strpos($text, 'class="no-rescale"') !== false) return "<img$text/>";
 
lunky84
12 years, 5 months ago
Brilliant thanks for this, it will be very useful!

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.