@@ -112,13 +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
117
123
118
const gifStyles = isGifInEarlyReturn ? (
124
119
size === "lg"
@@ -149,10 +144,6 @@ export default function IdealImage(
149
144
}
150
145
) : { } ;
151
146
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
147
return (
157
148
< div style = { {
158
149
position : "relative" ,
@@ -208,26 +199,8 @@ export default function IdealImage(
208
199
// Check if current image is a GIF
209
200
const isCurrentGif = currentImage . path ?. toLowerCase ( ) . endsWith ( '.gif' ) || false ;
210
201
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
202
const isGif = currentImage . path ?. toLowerCase ( ) . endsWith ( '.gif' ) || false ;
217
203
218
- console . log ( 'Is GIF detected:' , isGif ) ;
219
-
220
- // Debug logging
221
- if ( isGif ) {
222
- console . log ( 'GIF detected:' , {
223
- path : currentImage . path ,
224
- size : size ,
225
- maxWidth : MAX_SIZE_FILTERS [ size ] ,
226
- currentImageWidth : currentImage . width ,
227
- currentImageHeight : currentImage . height
228
- } ) ;
229
- }
230
-
231
204
// Apply conditional styles based on the `size`
232
205
const imageStyles : React . CSSProperties =
233
206
size === "lg"
@@ -260,18 +233,6 @@ export default function IdealImage(
260
233
} ) ,
261
234
} ;
262
235
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
- width : currentImage . width ,
271
- height : currentImage . height
272
- } ) ;
273
- console . log ( 'Image styles being applied:' , imageStyles ) ;
274
-
275
236
const containerStyles : React . CSSProperties = {
276
237
position : "relative" ,
277
238
...( background
@@ -321,7 +282,6 @@ export default function IdealImage(
321
282
} , 1000 ) ; // 1 second timeout
322
283
323
284
const testSpeed = async ( ) => {
324
- console . log ( "Downloading..." ) ;
325
285
const url = currentImage . path ! ;
326
286
const startTime = performance . now ( ) ;
327
287
@@ -388,4 +348,4 @@ export default function IdealImage(
388
348
</ div >
389
349
</ div >
390
350
) ;
391
- }
351
+ }
0 commit comments