File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,16 @@ const optimizeVTEX = (opts: OptimizationOptions) => {
104104 return src . href ;
105105} ;
106106
107+ const optimizeWake = ( opts : OptimizationOptions ) => {
108+ const { originalSrc, width, height } = opts ;
109+
110+ const url = new URL ( originalSrc ) ;
111+ url . searchParams . set ( "w" , `${ width } ` ) ;
112+ url . searchParams . set ( "h" , `${ height } ` ) ;
113+
114+ return url . href ;
115+ } ;
116+
107117export const getOptimizedMediaUrl = ( opts : OptimizationOptions ) => {
108118 const { originalSrc, width, height, fit } = opts ;
109119
@@ -112,6 +122,10 @@ export const getOptimizedMediaUrl = (opts: OptimizationOptions) => {
112122 }
113123
114124 if ( ! isImageOptmizationEnabled ( ) ) {
125+ if ( originalSrc . includes ( "fbitsstatic.net/img/" ) ) {
126+ return optimizeWake ( opts ) ;
127+ }
128+
115129 if ( originalSrc . startsWith ( "https://cdn.vnda." ) ) {
116130 return optmizeVNDA ( opts ) ;
117131 }
You can’t perform that action at this time.
0 commit comments