Image elements do not have explicit width and height

Short Answer Add the image’s native width and height in pixels as attributes on the image. This lets the browser calculate the aspect ratio for the image. <img width=”600″ height=”400″ src=”some-image.webp”/> Long Answer width: 100% does not give an element an explicit width. What it does is define the width relative to it’s parent container. … Read more

Does not use passive listeners to improve scrolling performance (Lighthouse Report) [closed]

There was a long thread on this topic in https://github.com/jquery/jquery/issues/2871 in 2016 In short: jQuery can’t add support to passive listeners. Is expected that this is added in jQuery 4 (4 years and still in 3.5.x) The proposed fix is to add this code right after jQuery load: jQuery.event.special.touchstart = { setup: function( _, ns, … Read more

Preloading Google Fonts

The correct way to preload a font would be by adding both a preload link and a stylesheet. A simplified example, based on MDN is as follows: <head> <meta charset=”utf-8″> <title>Preloading fonts</title> <link rel=”preload” href=”https://fonts.googleapis.com/css?family=Roboto&display=swap” as=”style”> <link rel=”stylesheet” href=”https://fonts.googleapis.com/css?family=Roboto&display=swap”> </head> <body> </body> In the above example, the preload link will send a request to fetch … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)