$params['width'] = $params['w'];
unset( $params['w'] );
}
+ if ( isset( $params['width'] ) && substr( $params['width'], -2 ) == 'px' ) {
+ // strip the px (pixel) suffix, if found
+ $params['width'] = substr( $width, 0, strlen( $width ) - 2 );
+ }
if ( isset( $params['p'] ) ) {
$params['page'] = $params['p'];
}
// If the worker that finished made this thumbnail then use it.
// Otherwise, it probably made a different thumbnail for this file.
return $file->getRepo()->fileExists( $thumbPath )
- ? $file->transform( $params )
+ ? $file->transform( $params, File::RENDER_NOW )
: false; // retry once more in exclusive mode
},
'fallback' => function() {