Images uploaded via Gutenberg image block are cropped
Images uploaded via Gutenberg image block are cropped
Images uploaded via Gutenberg image block are cropped
Maybe you can assign attachment to those categories after upload? Check this example. function add_category_automatically($post_ID) { $attach = get_post($post_ID); if ($attach->post_parent) { $cats = get_the_category()($attach->post_parent); foreach ($cats as $cat) { wp_set_object_terms($post_ID, $cat->slug, ‘category’, true); } } } add_action(‘add_attachment’, ‘add_category_automatically’); Source
set_post_thumbnail() requires the second parameter to be an int for attachment id, so the statement $res2 = set_post_thumbnail( $new_ID, $file_name); does not work. First you need to add the image to your database as an attachment and then you will be able to use its id to set it as thumbnail. See this example for … Read more
Try the Gutenberg Block Gallery plugin: https://wordpress.org/plugins/block-gallery/
Only checking if the cookie exists, is not much of a strict protection. To get a stronger protection, you can pass or “proxy” all requests to the uploaded folder (exemplary uploads in the following example) through a php script: RewriteCond %{REQUEST_FILENAME} -s RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 [QSA,L] All requests to uploaded files (which includes images in … Read more
Post images are not displayed in media library
Replicate Media Galley Edit view in Add Media View
Media item permalink goes to source file instead of attachment.php
If you are using custom theme, please add this in the functions.php: add_theme_support( ‘post-thumbnails’ );
Try t0 Regenerate thumbnails by using this plugin: https://wordpress.org/plugins/regenerate-thumbnails/