• I would like to change default image properties in WP 4.4 so when an image is inserted, its size is set by default to big and the link is set to media file. Is it possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey igor.bukanov

    About image size, I think it can help you https://developer.www.ads-software.com/reference/functions/add_image_size/

    Thread Starter igor.bukanov

    (@igorbukanov)

    I should clarify – this is not about adding new image size to WP. This is about selecting the defaults for an image when it is inserted into the post in the editor.

    Moderator Marius L. J.

    (@clorith)

    Hi,

    WordPress will actually remember your own settings after you’ve inserted an image, so if you set them to link to the media file and change the file size, the alternatives you chose will be the default for the next ones you insert as well.

    As far as I know, the preselected image size and “Link to” properties are tied to the last selection of the user, i.e. what you chose for image A will be preselected for image B.

    How exactly you’d want it to behave? Have the ‘large’ image size preselected always, overriding the last user’s selection? Or have as a default for the first time ever a user chooses an image?

    Whichever the case, it seems the default is handled in wp-includes/js/media-views.js by this line size: getUserSetting( 'imgsize', defaultProps.size ) || 'medium',

    However I’m not comfortable with JS so I’m just asking so that the person who knows how to change this behaviour, will know what you need exactly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘default image properties’ is closed to new replies.