generator, 'numberBetween' ], $width ); } // Makes sure we have an Int $width = absint( $width ); // Check For float (ratio) if ( is_float( $height ) ) { $height = floor( $width / floatval( $height ) ); } elseif ( is_array( $height ) ) { $height = call_user_func_array( [ $this->generator, 'numberBetween' ], $height ); } // https://picsum.photos/200/640/?random $url = "https://picsum.photos/{$width}/{$height}/?random"; return $url; } }