- public function getImage(string $pathInfo, array $texts, int $updated, ?string $source = null, int $width = 1200, int $height = 630): array {
+ public function getImage(string $path, array $texts, int $updated, ?string $source = null, ?int $height = null, ?int $width = null): array {
+ //Without source
+ if ($source === null && $this->config['facebook']['source'] === null) {
+ //Return empty image data
+ return [];
+ //Without local source
+ } elseif ($source === null) {
+ //Set local source
+ $source = $this->config['facebook']['source'];
+ }
+
+ //Without width
+ if ($width === null) {
+ //Set width from config
+ $width = $this->config['facebook']['width'];
+ }
+
+ //Without height
+ if ($height === null) {
+ //Set height from config
+ $height = $this->config['facebook']['height'];
+ }
+