Home › Forums › Support › Los elementos de imagen no tienen width y height explícitos This topic has 9 replies, 4 voices, and was last updated 1 year, 2 months ago by Elvin. Viewing 10 posts - 1 through 10 (of 10 total) Author Posts March 2, 2021 at 8:19 am #1679043 jmpefe78gmail-com Hola al analizar con Page Speed me dice que Los elementos de imagen no tienen width y height explícitos Esto me sucede en el Logo, ¿porqué sucede esto? https://tuwebdecero.com/wp-content/uploads/2021/03/cropped-logo-empresa-tu-web-de-cero.png Gracias March 2, 2021 at 10:25 am #1679200 LeoStaff Customer Support Hi there, Any chance you can link us to the site in question? You can use the private information field. Let me know 🙂 Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ March 2, 2021 at 11:00 am #1679246 jmpefe78gmail-com Sí, doy acceso. Hay que meter 2 veces el usuario y contraseña para que permita acceder al administrador March 2, 2021 at 1:28 pm #1679424 YingStaff Customer Support Hi there, You could give solution a try: https://generatepress.com/forums/topic/how-to-set-height-and-width-for-the-logo-image/#post-1563234 Adding PHP: https://docs.generatepress.com/article/adding-php/ March 2, 2021 at 2:21 pm #1679465 jmpefe78gmail-com He copiado el código en el funtions.php pero no desaparece el aviso. Que tengo que modificar aparte de poner las dimensiones de mi logo? March 2, 2021 at 3:24 pm #1679512 ElvinStaff Customer Support Hi there, I’ve checked your site and it doesn’t seem like you’ve applied the code properly. Can you tell us how you’ve added it? Here’s how you add PHP – https://docs.generatepress.com/article/adding-php/ A wise man once said: "Have you cleared your cache?" March 2, 2021 at 3:27 pm #1679513 jmpefe78gmail-com Hola de nuevo, lo eliminé al ver que no funcionaba. Me puedes poner aquí en código que tengo que pegar por favor? March 2, 2021 at 3:56 pm #1679528 ElvinStaff Customer Support You can try this snippet. add_filter( 'generate_logo_attributes', function($array){ $img_attr = array('width' => '200px', 'height' => '200x',); return array_merge($array, $img_attr); },15,1); A wise man once said: "Have you cleared your cache?" March 3, 2021 at 3:39 am #1680014 jmpefe78gmail-com Gracias. Se arreglo!!! 😉 March 3, 2021 at 3:27 pm #1681070 ElvinStaff Customer Support Nice one. Glad you got it resolved. No problem. 🙂 A wise man once said: "Have you cleared your cache?" Author Posts Viewing 10 posts - 1 through 10 (of 10 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In