feat: enhance image loading performance by adding fetchPriority and loading attributes in multiple components, and update MUI icons chunking in webpack configuration

This commit is contained in:
sebseb7
2025-07-20 15:05:29 +02:00
parent d3998133e5
commit a68d912c99
8 changed files with 17 additions and 10 deletions

View File

@@ -306,6 +306,8 @@ class Product extends Component {
height={ window.innerWidth < 600 ? "240" : "180" }
image="/assets/images/nopicture.jpg"
alt={name}
fetchPriority={this.props.priority === 'high' ? 'high' : 'auto'}
loading={this.props.priority === 'high' ? 'eager' : 'lazy'}
sx={{
objectFit: 'contain',
borderTopLeftRadius: '8px',
@@ -319,6 +321,8 @@ class Product extends Component {
height={ window.innerWidth < 600 ? "240" : "180" }
image={this.state.image}
alt={name}
fetchPriority={this.props.priority === 'high' ? 'high' : 'auto'}
loading={this.props.priority === 'high' ? 'eager' : 'lazy'}
sx={{
objectFit: 'contain',
borderTopLeftRadius: '8px',