When using Picturefill 2 I'm getting layout jumping on images while the page is loading, for example, when you don't specify height on a normal image. Is this expected with Picturefill and is there a way around this problem? Thanks.
Related Questions in IMAGE
- Golang lambda upload image into s3 static website
- Put an image behind the title in a WP, WooCommerce "shop" page
- How to create an JSOUP element from byte array image (Load from Database)
- Cloudflare not respecting Cache-Control
- Sending multiple images and data in a single angular observable
- Create and combine several images into a single image for my react native App
- Should I compress images in java backend before sending to frontend?
- Javascript Place Image Where User Clicks
- Whitespace in document has a bottom border remnant or some other line at the bottom of the whitespace
- Sony Spresense Camera Board
- After completely installation and done all the work i am getting Permission denied error do any one have solution
- HTML page on NAS server image not showing on mobile phone
- mouse coordinates in image go below 0 and above width
- Why are the css images or js not loading in my laravel project?
- Python pillow library text align center
Related Questions in HEIGHT
- How to set the height equal to width dynamically using css?
- Why the height of segment tree is O(logn)
- 100vh doesnt work properly on Safari iOS "Single tab" configuration
- using iText v8.0 HTML to PDF converter, the row heights look ok in HTML doc but NOT OK in PDF
- Using 100vh for responsive video centered on the screen?
- Tkinter - winfo_height() always returns 1
- Automatically adjust x axis text to just above or just below y=0 depending on whether bar is positive or negative
- Jetpack Compose: How to make all items in a FlowRow the same height
- Toggle for different height and width in JavaScript
- Height Calculation with Spherical Harmonics and Legendre Function: with R Code
- iframe height issue within an accordian
- Adjust height of div/section by content
- Recharts chart takes extra height and breaks grid
- how to increase height of the gridline in highcharts?
- Progress cell height is equal to table body height
Related Questions in PAGELOAD
- delay in page load when moving from client slide page to ssr page in nextjs
- How can I stop slideout on subsequent page load?
- Calling a stored procedure on page-load in ASP.NET webforms using VS 2019
- Page not opening but URL is entered in browser in Selenium Java with Cucumber Automation
- Setting a component's variable to localStorage / global variable value on the initial render
- Website flashing for a few frames when navigating between subpages while logged in wordpress
- How to disable css transition load with given script
- How to start sound after page load and change by click function
- Selenium unable to stop page loading
- Disable button if dropdownlist is null
- React Pages Load white page
- Redirecting to a content page in ASP.NET C# but page_load is fired multiple times with different urls including JS
- Why my element undefined in code but defined if I run the code in console js?
- Performance of page load with multiple scripts and HTTP multiplexing
- Yii2 Page doesn't always load content properly until refresh
Related Questions in PICTUREFILL
- How to use fallback on picture tag - Safari Webp
- Do <picture> HTML sources make several server requests or just one?
- Use of picture element as a container instead of a div
- fetch().then / fetch different?
- Image resolution is bad when max-width:100% in css - resize down
- <picture /> element is not working as expected in Safari browser, while using React
- IE is not loading the right image, using <picture>
- How to expand image as text overlay expands?
- picture element responsive images not working with angular 4
- html picture element not honoring small media query
- how to Remove object and filling with Background if i have pixel locations
- Picturefill in IE11 with Vue.js
- Changing img based on window size
- only default images shows when using <source>
- Picturefull/Lazysizes: Unable to get property push in IE
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
The problem you are describing isn't necessarily limited to Picturefill. To avoid this issue you can calculate the ratio of the image’s height to its width. Even with loading images for a responsive site, though you may not know the image dimensions because of screen size, this ratio will be the same. For example, for a height of 200px and width of 300px:
Create a container div around the Picturefill element(s)
And use the following CSS
That should work. Check out this blog post and this CodePen example for more info.
EDIT
This method doesn't work if the ratios of the image widths and heights are different for responsive image loading. I just ran into this situation so just a heads up.