0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Updated sign up form to use resized version of icon

fixes https://github.com/TryGhost/Team/issues/3345

The icon is now served as a 128x128px version
This commit is contained in:
Simon Backx 2023-06-05 17:58:30 +02:00
parent ae6a2ba0cc
commit 1e7b658148
3 changed files with 5 additions and 2 deletions

View file

@ -89,7 +89,9 @@ export default class SignupFormEmbedModal extends Component {
let style = 'min-height: 58px';
if (this.style === 'all-in-one') {
options.logo = this.settings.icon;
// We serve twice the size of the icon to support high resolution screens
// (note that you'll need to change the resolution in the backend config as well, as not all resolutions are supported)
options.logo = this.settings.icon.replace(/\/content\/images\//, '/content/images/size/w128h128/');
options.title = this.settings.title;
options.description = this.settings.description;

View file

@ -33,7 +33,7 @@ function serializeSettings(models, apiConfig, frame) {
// If this is public, we already have the right data, we just need to add an Array wrapper
if (utils.isContentAPI(frame)) {
filteredSettings = models;
// Change the returned icon location to use a resized version, to prevent serving giant icon files
const icon = filteredSettings.icon;
if (icon) {

View file

@ -121,6 +121,7 @@
},
"internalImageSizes": {
"icon": {"width": 256, "height": 256},
"signup-form-icon": {"width": 128, "height": 128},
"email-header-image": {"width": 1200},
"email-latest-posts-image": {"width": 200, "height": 200},
"email-latest-posts-image-mobile": {"width": 1200, "height": 960}