1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress How To Specify image dimensions? And Enable gzip compression?

Discussion in 'Blogging' started by tompots, Nov 13, 2013.

  1. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    Dose anyone know how to Specify image dimensions in WordPress, I also need to find out how to Enable gzip compression, I'm optimizing my site for speed and I'm stuck on these problems, Searching just turns up dodgy information about theses problems. I'm hoping that some of the WordPress veterans can help me get these problems sorted?
     
    • Thanks Thanks x 1
  2. IamBlackhatter

    IamBlackhatter Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 26, 2011
    Messages:
    2,537
    Likes Received:
    1,458
    Gender:
    Male
    Occupation:
    Software Developer
    Location:
    india
    You want the image dimensions to be changed in posts if so you can just click the image and change it.For gzip compression use w3 total cache plugin it does the job.
     
    • Thanks Thanks x 1
  3. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    Thank you for your response, I'm using w3 total cache plugin and have Enable HTTP (gzip) compression but for some reason it dose not seem to be working for me, is there some other settings that I have to enabled for this function to work correctly?
     
  4. aspe_heat

    aspe_heat Power Member

    Joined:
    Oct 7, 2010
    Messages:
    799
    Likes Received:
    595
    Gender:
    Male
    Is it only me or it's kinda complicated to set up that W3 plugin? When I install it, it gives me tons of messages and when I apply the changes, it totally messes up my website...no idea why.

    Also, sorry for the thread jacking! I hope it's ok. I am just wondering if specifying image dimensions means using only one image dimensions? For example, I need 660x330 photos as my featured image, is there any way to make WordPress automatically resize featured images to that size?

    I am also trying to speed up my website and "online" guides are sometimes too complicated...
     
    • Thanks Thanks x 1
  5. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:

    This video is how I got w3 total cache plugin setup correctly, take your time and follow every step he gives you, and it should, in theory work for you.

    I use this one:
    Code:
    http://www.youtube.com/watch?v=HypaoFdzmxo
    
    And just found this one
    Code:
    http://www.metacdn.com/speed-up-wordpress/totalcache
    
     
    • Thanks Thanks x 1
    Last edited: Nov 13, 2013
  6. IamBlackhatter

    IamBlackhatter Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 26, 2011
    Messages:
    2,537
    Likes Received:
    1,458
    Gender:
    Male
    Occupation:
    Software Developer
    Location:
    india
    you may resize but it will look stretched if the image is smaller.You can also enable gzip via htaccess directly see how to do that in web :)
     
    • Thanks Thanks x 1
  7. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    Thanks, thats why I'm asking here beasuce the information on the web about gzip compression with wordpress is all outdated and incomplete, at least everything I could find, I need a tutorial or something along those lines.
     
  8. IamBlackhatter

    IamBlackhatter Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 26, 2011
    Messages:
    2,537
    Likes Received:
    1,458
    Gender:
    Male
    Occupation:
    Software Developer
    Location:
    india
    This is to enable gzip compression via .htaccess file you can find this file in your hosting where you installed wordpress and just edit that by adding code below

    Code:
    # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddType x-font/otf .otf AddType x-font/ttf .ttf AddType x-font/eot .eot AddType x-font/woff .woff AddType image/x-icon .ico AddType image/png .png
     
    • Thanks Thanks x 1
  9. gullsinn

    gullsinn Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 24, 2009
    Messages:
    2,429
    Likes Received:
    2,210
    Gender:
    Male
    Occupation:
    Jobless :D
    Location:
    Graveyard
    Home Page:
    Did you tried any plugin like W3 Total cache or Super Cache?
     
    • Thanks Thanks x 1
  10. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    I'm using W3 Total cache, but from the information I gather form here http://gtmetrix.com/ it dose not seem to be actively working on my site.
     
  11. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    Added it, and it still dose not seem to be working for me.
     
  12. travanx

    travanx Regular Member

    Joined:
    Feb 6, 2012
    Messages:
    354
    Likes Received:
    76
    Home Page:
    I manually make my images a certain size to what I want the user to be able to click and get full size to. Then after uploading the pic to a page or post, I insert into the post using a resize percentage.

    I am also using nextgen and prefer the way the new nexgten gallery handles picture inserts as it seems to just fit to the width of the page or margins when I insert a single picture. Seems to end up more clean than the default wordpress picture insert.

    W3 didn't speed up my blog so I stopped using it. Instead I focused on optimizing new images. picresize dot com seems easy enough to use.
     
    • Thanks Thanks x 1
  13. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    Thank you for your reply, I also use http://www.picresize.com/ to help me Serve scaled images, but I need to know how to Specify image dimensions, from the information that I have gather on the web this is somehow done in the CSS of the page, but the info I found doesn't tell how to do this exactly.
     
    Last edited: Nov 13, 2013
  14. qrazy

    qrazy Senior Member

    Joined:
    Mar 19, 2012
    Messages:
    1,111
    Likes Received:
    1,712
    Location:
    Banana Republic
    If you're looking to reduce the file size of image served, you can't do it in HTML/CSS, it will just be displayed in different dimensions you set but file size will not be changed. You'll have to resize the image before uploading.

    For enabling gzip you should have the access to edit .htaccess file. Without that even if you set it in the plugin, the changes won't be applied to your server. And I don't think the enabling gzip will have any impact on the images served, may be the caching will help.

     
  15. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    Hello and thank you for replying, this is the massage that GTmetrix is giving me about the Specify image dimensions problem "The following image(s) are missing width and/or height attributes." is there a way to Specify image dimensions directly in the URL of the image?
     
  16. notyourmatey

    notyourmatey Power Member

    Joined:
    Jul 7, 2011
    Messages:
    573
    Likes Received:
    324
    Location:
    TOP3
    make sure your host supports gzip compression- iamblackhatter gave you proper solution, it should work. also i stopped using this shitty w3total cache plugin as it is often hacked.
     
    • Thanks Thanks x 1
  17. notyourmatey

    notyourmatey Power Member

    Joined:
    Jul 7, 2011
    Messages:
    573
    Likes Received:
    324
    Location:
    TOP3
    also try this code for gzip compression:

    it works on my wp sites
     
    • Thanks Thanks x 1
  18. qrazy

    qrazy Senior Member

    Joined:
    Mar 19, 2012
    Messages:
    1,111
    Likes Received:
    1,712
    Location:
    Banana Republic
    You've to specify the image dimensions as part of the IMG tag in html like

    so that the browser know the dimensions beforehand and draws the image as it downloads, otherwise it will download the whole image first and redraw the image to fit in to the area specified.


     
    • Thanks Thanks x 1
  19. Conor

    Conor Jr. VIP Jr. VIP

    Joined:
    Nov 7, 2012
    Messages:
    3,356
    Likes Received:
    5,418
    Gender:
    Male
    Location:
    South Africa
    Home Page:
    I had the same problem, try setting your Minify settings to Auto :)
     
    • Thanks Thanks x 1
  20. th0m4s

    th0m4s Regular Member

    Joined:
    Jul 8, 2013
    Messages:
    243
    Likes Received:
    57
    Your web host may not have enabled it, some of the hosting accounts I have used had it disabled due to config, another didn't turn it on and my latest one uses it by default.
     
    • Thanks Thanks x 1