@@ -112,14 +112,8 @@ export default function IdealImage(
112
112
113
113
// In dev env just use regular img with original file
114
114
if ( typeof img === "string" || ( typeof img === "object" && img !== null && "default" in img ) ) {
115
- console . log ( '=== Early Return Debug ===' ) ;
116
- console . log ( 'Image type:' , typeof img ) ;
117
- console . log ( 'Has default property:' , typeof img === "object" && img !== null && "default" in img ) ;
118
- console . log ( 'Image value:' , img ) ;
119
115
const isGifInEarlyReturn = typeof img === "string" ? img . endsWith ( '.gif' ) :
120
116
( typeof img === "object" && img !== null && typeof img . default === "string" && img . default . endsWith ( '.gif' ) ) ;
121
- console . log ( 'Is this a GIF?' , isGifInEarlyReturn ) ;
122
-
123
117
const gifStyles = isGifInEarlyReturn ? (
124
118
size === "lg"
125
119
? {
@@ -149,10 +143,6 @@ export default function IdealImage(
149
143
}
150
144
) : { } ;
151
145
152
- console . log ( 'GIF styles being applied:' , gifStyles ) ;
153
- console . log ( 'Size parameter:' , size ) ;
154
- console . log ( 'Max width should be:' , MAX_SIZE_FILTERS [ size ] ) ;
155
-
156
146
return (
157
147
< div style = { {
158
148
position : "relative" ,
@@ -208,18 +198,10 @@ export default function IdealImage(
208
198
// Check if current image is a GIF
209
199
const isCurrentGif = currentImage . path ?. toLowerCase ( ) . endsWith ( '.gif' ) || false ;
210
200
211
- // Check if current image is a GIF
212
- console . log ( 'Current image object:' , currentImage ) ;
213
- console . log ( 'Current image path:' , currentImage . path ) ;
214
- console . log ( 'All images in set:' , img . src . images ) ;
215
-
216
201
const isGif = currentImage . path ?. toLowerCase ( ) . endsWith ( '.gif' ) || false ;
217
202
218
- console . log ( 'Is GIF detected:' , isGif ) ;
219
-
220
203
// Debug logging
221
204
if ( isGif ) {
222
- console . log ( 'GIF detected:' , {
223
205
path : currentImage . path ,
224
206
size : size ,
225
207
maxWidth : MAX_SIZE_FILTERS [ size ] ,
@@ -260,17 +242,9 @@ export default function IdealImage(
260
242
} ) ,
261
243
} ;
262
244
263
- // Debug logging after styles are created
264
- console . log ( '=== IdealImage Debug ===' ) ;
265
- console . log ( 'Current image path:' , currentImage . path ) ;
266
- console . log ( 'Is GIF detected:' , isCurrentGif ) ;
267
- console . log ( 'Size parameter:' , size ) ;
268
- console . log ( 'Max width for size:' , MAX_SIZE_FILTERS [ size ] ) ;
269
- console . log ( 'Current image dimensions:' , {
270
245
width: currentImage . width ,
271
246
height : currentImage . height
272
247
} ) ;
273
- console . log ( 'Image styles being applied:' , imageStyles ) ;
274
248
275
249
const containerStyles : React . CSSProperties = {
276
250
position : "relative" ,
@@ -321,7 +295,6 @@ export default function IdealImage(
321
295
} , 1000 ) ; // 1 second timeout
322
296
323
297
const testSpeed = async ( ) => {
324
- console . log ( "Downloading..." ) ;
325
298
const url = currentImage . path ! ;
326
299
const startTime = performance . now ( ) ;
327
300
@@ -388,4 +361,4 @@ export default function IdealImage(
388
361
</ div >
389
362
</ div >
390
363
) ;
391
- }
364
+ }
0 commit comments