You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
User interface
Images don't scale correctly: always to quadratic dimensions, regardless of original aspect ratio or desired dimensions. Image URLs end with "s900", for example. I now have to pre-scale my images to what I think will be the most useful size and set the desired dimension to 0x0 px to leave them unscaled by appengine-wordpress-plugin. This involves modifying the theme I'm using.
For example, in the the Customizr theme, there is a file named wp-content/themes/customizr/inc/class-fire-init.php in which image dimensions for the slider are set: $this -> slider_size = array('width' => 1170 , 'height' => 500, 'crop' => true );
By default, appengine-wordpress-plugin will scale them to 1170x1170px. I tried setting width to zero, but to my surprise images were then scaled to 500x500px! So the plugin can read both width and height, but still ignores one of them to produce a square version of the image? Finally, I have set both width and height to zero, and uploaded pre-scaled images, and that works for the general case.
Admin interface
It is not possible to save any edited images from the admin interface. Instead of saving to Cloud Storage, it just fails. Running plugins like "Regenerate Thumbnails" does not work. Inserting images into posts the normal way gives the same scaling issue as described above for the user interface (always quadratic images). You have to switch to text mode and manually edit all links, or use the public version of the links and paste them in manually.
The text was updated successfully, but these errors were encountered:
I also found this issue in the featured image of the post.
The featured image is generated by dynamically resizing/cropping via Google Storage like this:
It looks like the storage is built using picasa syntax. This article discusses how to better control image dimensions and clipping.
My change was
if (self::is_production()) {
if ( ! is_null( $options['size'] ) ) {
if ($options['crop']) {
// this will cause the image to be downsized, then clipped to fit our dimensions.$url .= '=w' . $size['width'] . "-h" . $size['height'] . "-p";
} else {
$url .= ('=s' . $options['size']);
}
}
else {
$url .= '=s0';
}
}
It seems to be working really well, but I'd love to hear back if anyone else tries this.
Images don't scale correctly: always to quadratic dimensions, regardless of original aspect ratio or desired dimensions. Image URLs end with "s900", for example. I now have to pre-scale my images to what I think will be the most useful size and set the desired dimension to 0x0 px to leave them unscaled by appengine-wordpress-plugin. This involves modifying the theme I'm using.
For example, in the the Customizr theme, there is a file named wp-content/themes/customizr/inc/class-fire-init.php in which image dimensions for the slider are set:
$this -> slider_size = array('width' => 1170 , 'height' => 500, 'crop' => true );
By default, appengine-wordpress-plugin will scale them to 1170x1170px. I tried setting width to zero, but to my surprise images were then scaled to 500x500px! So the plugin can read both width and height, but still ignores one of them to produce a square version of the image? Finally, I have set both width and height to zero, and uploaded pre-scaled images, and that works for the general case.
It is not possible to save any edited images from the admin interface. Instead of saving to Cloud Storage, it just fails. Running plugins like "Regenerate Thumbnails" does not work. Inserting images into posts the normal way gives the same scaling issue as described above for the user interface (always quadratic images). You have to switch to text mode and manually edit all links, or use the public version of the links and paste them in manually.
The text was updated successfully, but these errors were encountered: