getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[seo-magic] Use default image size/no meta image size #367

Closed blizam closed 1 year ago

blizam commented 1 year ago

If you don't set a meta image Size X and Size Y value in the plugin settings the generated image at the /page-folder/seomagic-image/ returns a division by zero error.

grav.CRITICAL: Division by zero - Trace: #0 [internal function]: Gregwar\Image\Adapter\Common->zoomCrop(NULL, NULL)

I'd prefer not to set any size and let Facebook/Twitter do their own cropping.

also... and I can raise another issue ticket... but is it possible to have it return the actual image file URL instead of the /seomagic-image/ slug?

rhukster commented 1 year ago

there has to be 'some' size when it comes to webshots, but perhaps i can isolate this specific use case. Typically tho, you should not rely on those consuming opengraph to resize for you. In fact there are some instances (such as WhatsApp) that will ignore you image completley if it's too large. Facebook recommends 1200x630 (https://developers.facebook.com/docs/sharing/webmasters/images/) which is exactly what we use.

blizam commented 1 year ago

Fair enough, my concern is mostly with smaller images getting oversized or with square/circular images getting cropped to where their top and bottom gets chopped off. If those fields have to be specified even just making them required in the admin would be an improvement. Thank you!

blizam commented 1 year ago

I guess I would like to request the option to be able to have no image resizing be performed IF webshots is not being used.