Tagged: child theme, logo, size
-
AuthorPosts
-
July 6, 2017 at 6:30 pm #817428
Working on a new Enfold site. When I post a logo at 465 x 224, the image tag reads:
<img height="100" width="300" src="http://borsheims.mediumstudios.com/wp-content/uploads/2017/07/thehub-300x145.png" alt="Borsheims" />
I can adjust the logo size with CSS as I’ve seen in other answers to logo size questions but then it just distorts it by stretching.
How do I get it to pull the full size version of the logo so it’s nice and crisp?
I’m using a child theme and have no fear of altering whatever code is needed to do this.
- This topic was modified 7 years, 4 months ago by rgruber.
July 7, 2017 at 5:32 am #817609Hey rgruber,
Could you post a link to the site in question so that we can take a closer look please?
Best regards,
RikardJuly 7, 2017 at 11:12 am #817748Here you go:
July 9, 2017 at 9:12 am #818352Hi rgruber,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaJuly 9, 2017 at 4:08 pm #818399Info provided below in private content.
July 10, 2017 at 8:08 am #818585Hi,
So you need to access the height attributes directly in the image tag?
Best regards,
Jordan ShannonJuly 10, 2017 at 2:39 pm #818752I want the image tag to either specify the natural full image size: 466 x 224 or not specify any size so it uses the full image.
What I DON’T want is what is is doing now where it specifies the WRONG image size:
<img height="100" width="300" src="http://borsheims.mediumstudios.com/wp-content/uploads/2017/07/thehub-300x145.png" alt="Borsheims" />
This suggests to me that it’s pulling the medium version of the image rather than the full size version.
I’m using a child theme “borsheims”, so I’m happy to alter the code where ever I need to, to pull the full size image. Right now I’m stretching it with CSS but it looks terrible. I need it to be 466 x 224 naturally.
How do I make it do this?
- This reply was modified 7 years, 4 months ago by rgruber.
July 10, 2017 at 3:39 pm #818810Hi,
If you’re uploading the image via WordPress’s Media Manager, goto > Settings > Media in your admin panel and configure the max dimensions for the “Large” images uploaded via this.
Also, make sure there is no generic css overriding your image sizes anywhere (from a plugin, quick css, etc)
Best regards,
Jordan Shannon- This reply was modified 7 years, 4 months ago by Jordan Shannon.
July 10, 2017 at 3:44 pm #818815The image size for large images is currently set to 1030 x 1030.
This isn’t the problem.
Can you just tell me where in the code it is writing in the image tag so I can go in and change it?
It doesn’t seem like you are really understanding the issue.
I want the child theme to place the FULL SIZED Logo image in the header. There must be a way to NOT have it write a 300 x 100 image tag.
- This reply was modified 7 years, 4 months ago by rgruber.
July 10, 2017 at 4:48 pm #818854Hi,
I have removed the sizing attributes with a small bit of JS. Please see the following:
This is what was added to functions.php:
function LogoSizeCorrection() { echo '<script type="text/javascript"> // Document ready jQuery(document).ready(function(){ jQuery(".logo a img").removeAttr("width height"); }); </script>'; } add_action( 'wp_footer', 'LogoSizeCorrection' );
Let me know if this is okay
Best regards,
Jordan ShannonJuly 10, 2017 at 4:54 pm #818859Almost.
It does remove the sizing from the image, but it is still pulling a smaller version of the image:
<img src="http://borsheims.mediumstudios.com/wp-content/uploads/2017/07/thehub-300x145.png" alt="Borsheims" />
Is there a way for it to pull the full size version rather than the 300 x 145 version?
It seems like the function that loads the image itself is calling for the medium size WordPress image rather than the full size one.
Thanks for your continued help. Really appreciate it.
- This reply was modified 7 years, 4 months ago by rgruber.
July 10, 2017 at 8:31 pm #818966Hi,
Would you be able to provide admin info for the Dashboard?
Best regards,
Jordan ShannonJuly 10, 2017 at 9:45 pm #818996Information in private content below:
July 10, 2017 at 11:18 pm #819020Hi,
This is fixed. Please check to confirm. I re-uploaded the logo and selected the proper size from the media option. Please see the following:
Best regards,
Jordan ShannonJuly 10, 2017 at 11:22 pm #819022Thank you Jordan.
Appreciate your follow up. Must have missed the media size option.
July 10, 2017 at 11:30 pm #819034Hi,
No problem at all. I’m glad we were able to get this sorted out. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Logo Size being written into image tag, re-sizing through CSS distorts’ is closed to new replies.