Hi
Recently, I disabled few image sizes that the theme generates by tweaking a few code on functions.php. But I would like to completely disable image generating and use the cropping function.
For example, if I upload a 1024×768 image, the theme would crop it or just crop it to fit the <div>. I really don’t like the fact that this themes generates a lot of images and to be honest, I use almost all of the blocks throughout my site. So, I couldn’t disable many sizes.
Please let me know if it is possible or not.
Cheers!
Hi,
When you upload and image WordPress automatically crops that image on multiple sizes and based on that function the thumbs needed by the theme to the different modules you are using are made https://forum.tagdiv.com/modules-and-blocks/
You can read more about this here:
1. http://codex.wordpress.org/Function_Reference/add_image_size
2. http://www.davidtan.org/wordpress-hard-crop-vs-soft-crop-difference-comparison-example/
Thanks
Hi,
You could but then you will have to modify all image container module/slides.. to use just that only image size and then use css to resize the image container for each module/slider.. which is not an easy job as the theme hasn’t been designed like that.
Other think you would worry about it’s that in case you modify it to use just one image then if the image size it’s let’s say to 1/2 MB that will be loaded on every module and you will have a 1/2 MB large image loading instead of an thumb size image.
Thanks
Hi again,
I’ve inserted a 300X250 non adsense responsive Ad on the sidebar.
However – when I perform the Gmetrix Performance report, I get this message the some images are missing width and/or height attributes, among them also the 300×250 Ad:
The following image(s) are missing width and/or height attributes.
http://cobras.org/Home/wp-content/themes/Newspaper/images/icons/ico-video-large.png (Dimensions: 40 x 40)
http://cobras.org/Home/wp-content/themes/Newspaper/images/icons/similar-right.png (Dimensions: 6 x 9)
http://cobras.org/Home/wp-content/uploads/2014/10/Small-Ad-box-2.jpg (Dimensions: 300 x 250) (8 uses)
Why is that? And how to repair? (also these first 2 pngs)
Thanks,
Bran
Hi,
Use this div tag’s for the sidebar ad image (just add the image URL):
<div class="td-visible-desktop">
<a href="#"><img width="300" height="250" src="" /></a>
</div>
<div class="td-visible-tablet-l">
<a href="#"><img width="250" height="250" src="" /></a>
</div>
<div class="td-visible-tablet-tp">
<a href="#"><img width="200" height="200" src="" /></a>
</div>
<div class="td-visible-phone">
<a href="#"><img width="300" height="250" src="" /></a>
</div>
Add the height="40" attribute to the large video icon like this: http://screencast.com/t/qiI1eSi7b
Add height="9" here:
* http://screencast.com/t/IxG5m3Qd8e
* http://screencast.com/t/CDFhEx3Q
After this please check again.
Thanks
-
This reply was modified 11 years by
Lucian.
Hi Lucian – sorry to bother again, but I’m having the same issue with the top header AD. I put in a 728 x 90 image (as mentioned in your demo), but I get the same Gmetrix errror regarding this image (missing width and/or height attributes).
Can you please send me the div tag’s for the header ad image?
Thanks!
Hi,
You just need to manually add the width and height so if you plan to use a 728 x 90 size image your div tags should look like this:
<div class="td-visible-desktop">
<a href="#"><img width="728" height="90" src="" /></a>
</div>
<div class="td-visible-tablet-l">
<a href="#"><img width="468" height="60" src="" /></a>
</div>
<div class="td-visible-tablet-tp">
<a href="#"><img width="468" height="60" src="" /></a>
</div>
<div class="td-visible-phone">
<a href="#"><img width="300" height="250" src="" /></a>
</div>
Thanks