Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Images are used in different ways by WordPress.You can use a theme with images in layout, place images within your post/page content, display images next to visitor's name called avatars etc

0
votes
0answers
14 views

Something in parent theme is preventing child theme from being able to crop images

I have a dilemna where I can't crop images with add_image_size() in my child theme. Instead of cropping, the images are scaled. I've tried all the usual stuff like regenerating images and changing ...
-1
votes
0answers
19 views

Grid content image

it's simple I wanna do this: https://www.allopsm.fr/devis-marque/ a grid with image and when you click it's open another grid on the same page. I think it's javascript ou jQuery, but what I'm asking ...
0
votes
0answers
17 views

How can I add an image to Wordpress' image array

I want to apply a filter to an image whenever one is uploaded and add the new image to the original's image array, similar to how multiple image sizes are added to each image array. example Image ...
0
votes
1answer
9 views

Control the srcset much more (not all sizes in it each time)

I'd like to be have more control on the srcset on certain important images of my website if not all. By default the srcset includes all the sizes created by wordpress for all the images. I'd like to ...
1
vote
0answers
11 views

Video processing using ffmpeg in Wordpress (Video preview)

I want to preview the submitted video articles. As a clear example; youtube video thumbnails. But I'm not talking about a fixed image. When the mouse is over the thumbnail, it should show a few frames....
0
votes
1answer
17 views

How can i add a section of category image upload during adding of category in wp admin area?

can anyone please tell me? i want when i add a category then there to be a section to upload the category image ,i just uploading the image where i want the section it is denoted by circled area, if ...
0
votes
1answer
27 views

copy attachments to another post type and change attachment url

On my site I have to custom post types and a function that let's users import photos from post type A to post type B, copying the meta values and it copy's the image to the folder specified for post ...
0
votes
0answers
10 views

Why are multiple copies of the same image downloaded on every request?

Why are multiple copies of the same image downloaded on every request? There are 57 img tags in the HTML doc sent to the browser. When I filter the results of the network tab in chrome dev tools by "...
0
votes
0answers
16 views

Site Url thumbnail image [closed]

I installed the JetPack plugin and the Yoast SEO plugin. Now, my site URl image is of a random sponsor logo instead of my profile pic or latest featured image from a blog post. How do I correct? ...
2
votes
1answer
25 views

getting uploaded SVG dimensions on front-end

Having successfully uploaded an SVG image through WordPress back-end with the help of third party plugins such as Safe SVG, how can one get the image's dimensions that are stored in SVG's width, ...
0
votes
0answers
21 views

How to Upload image and show in page in wordpress customPostType?

Iam new in wordpress Theme development ,I have made a custom Post for image upload . The code in functions.php is here: register_post_type('features1', array( 'labels' => ...
0
votes
0answers
18 views

Products Images In Catalog Page

hope this question is fit here. I have a WooCommerce website and the products images are shown in different sizes. Even some which have been uploaded at the same size. For example - I have an image ...
-2
votes
0answers
17 views

Remove -300x300.jpg from image link in Woocommerce

I used regenerate thumbnails plugin and after that I decided to delete all those images like 300x300 etc but In my woocommerce shop images are now broken because they are using the thumbnails image ...
1
vote
1answer
16 views

Unread Repeater field IMG alt not working

I've got a repeater field with images; <?php $produkt = get_field('produkte-startseite'); <div class="row start-products"> <?php foreach ($produkt as $produkte): ?> <a href="&...
0
votes
0answers
13 views

Problem adding several images

first of all thank you for reading my question and see if I am lucky and someone can help me. I am creating a fashion website and I bought a payment template that was very well suited to my needs, ...
-1
votes
1answer
37 views

Are image addresses security relevant?

I have a website, where images are like: <img src="upload/test.jpg"/> But I checked some larger sites and they have a different src as: <img src="imgrur.com/9keqqq"/> My question is, ...
0
votes
1answer
9 views

Schedule image post on download

I have lots of schedule posts containing external images and I want to be able to auto download the images & linked to media library when the post status changes to publish. This is the code so ...
0
votes
0answers
17 views

Image size in browser is defaulting to fill the container despite editor / styling settings

I am in the process of building my first theme. I have built everything up slowly and have a very simple setup. Now I am stuck on something that is probably a very easy fix. Problem: When I add an ...
0
votes
0answers
10 views

Can I edit mogrify command arguments in WordPress if it uses ImageMagick during upload of images?

Reading through https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/ and https://wordpress.org/plugins/ricg-responsive-images/ from my understanding, it seems that ...
0
votes
0answers
8 views

not getting all the images added to the post getting images from the gallery

I am getting all the images of the product gallery. how can get the images that the user have added to the post from the product gallery <p> <?php $images =& get_children( array ( ...
0
votes
1answer
26 views

Image Upload Custom Form Field for Category and Custom Taxonomy

I am currently customizing a Wordpress Theme, and I want to add a new form field on Category for uploading an image. The image should be retrieved from the Media Library. I found out that there are ...
0
votes
0answers
21 views

How to remove images from posts by their dimensions

There are lots of low-dimension images in our WordPress posts which have been inserted by mistake. We want to remove all <img> tags which has an image with height or weight lower than 200px. ...
0
votes
1answer
38 views

How to Make Wordpress Default gallery responsive on mobile?

I have read about the subject in many blogs and forums but I have not achieved anything. What I would like to do on my page is the following: decalaveras.com On this page, when accessed from mobile,...
1
vote
1answer
53 views

Adding Featured Image to Post programatically

How do I add a Featured Image programatically, given the URL/filename of the image, and Post ID associated with it?
1
vote
1answer
53 views

Featured images not displaying at full resolution

The image in my media library is 560×315, but when I inspect the image this is the code I find. srcset images are being loaded instead of my full resolution image. <img src="https://domain.com/...
0
votes
0answers
35 views

Delete images for unused media image sizes, without regenerating other thumbnails

I have set 5 custom image sizes in my theme. On top of the 3 default image sizes, I have around 10 other unused image sizes from a plugin that I'm not using anymore. I want to delete the images for ...
0
votes
0answers
11 views

WP Large Images crash page

I am experiencing an issue where multiple 7MB image with 4000px on widest side in a photo gallery crashes a wordpress page -- or the page becomes non-respondant. I use smush to size my images. any ...
0
votes
0answers
11 views

Image degradation after importing XML

I am switching my blog from Blogger to WordPress and importing XML file. Everything works fine except the images; the image quality is degraded/blurred due to low resolution. I found that the imported ...
2
votes
1answer
100 views

Download external images if post is publish

I have scheduled posts that contain external images. I want it to automatically download images & linked to the media library if the post status is publish. Now the problem is my code won't ...
0
votes
2answers
39 views

Generate links on all images in posts - is there a hook?

I am looking for a way to replace all links on images. Currently when a user clicks an image it links to the source file. What I want it to do is to ink to: example.com/editor=12&image=filename....
0
votes
1answer
16 views

Media is not showing on post page

I'm building a wordpress website based on the theme "Bulk Shop". Most of the content will be added as "post" and will be categorized into "next show", "last show", "music", "videos", etc. https://...
0
votes
0answers
13 views

How to post images in a menu without it being a post or page?

So I created a menu with a form where people can send me pictures and videos and now i want to post that images and videos to a menu each time the y send me a file, but I don't want it to be a post ...
0
votes
0answers
27 views

How can I use an image from an external source without uploading it to the media library

I am looking for a way to tweak my xml parser code to insert a url from an external source into a new post, instead of first uploading it to the website's media library and than adding the attachment. ...
0
votes
0answers
21 views

Why image Thumbnail url is not displaying with custom size?

The website has only one thumbnail size 375x211. I want to show this size thumbnail image at site homepage so that when I copy this image it only copies in 375x211 size, not in full image size which ...
0
votes
0answers
15 views

add_image_size diffrent cropping same height and width

I add some image size. I see them and can use it. But wordpress only make one cropped file. Cause it generate image 3 times with "IMAGENAME-880x1200.jpg" I think its because all have the same ...
0
votes
0answers
13 views

metabox images outside post (wordpress)

i have a little problem while getting images from a post to an external page, ex: i want to use lastest post images inside a slider used as header placed to the homepage (i'm using metabox to insert ...
0
votes
0answers
13 views

the_content() breaks html while generating exceprt up to “more” tag

So I have a post with img src in it, after which goes the "more" tag. Something like this: text <img src= http://images.com/images/image.jpg> text <!--more--> more text Notice the space ...
1
vote
1answer
53 views

Check if the image exists in WordPress media library

I have developed a plugin to insert posts using cron jobs. I am creating post thumbnails using this function: function Generate_Featured_Image( $image_url, $post_id ){ $upload_dir = ...
0
votes
0answers
6 views

Determine From Database or Export File Whether Full Image or Not

I have a Wordpress export file. How do I tell whether an attachment is the original or not? I need to import the original and skip any versions of the original such as thumbnails, etc.
0
votes
1answer
18 views

How to change the alignment of the background image for small screen (tablet/smartphone etc.)

I'm using the standard WordPress "Twenty Seventeen" theme and have changed the default background image to a custom one. The most important part of that image is the left margin. I was unable to ...
0
votes
0answers
50 views

Get_theme_file_uri() does not bring the correct path

i am trying to get the path of the background-image for the dive and i used the function of <div class="inner_about_event" style="background-image: url(<?php echo get_theme_file_uri('/assets/...
0
votes
2answers
27 views

Getting alt text of featured image

I'm trying to get the alt text of our featured image and have it output on the frontend. Currently my code is <img class="vehicle-photo" src="<?php echo the_post_thumbnail_url() ?>" alt="&...
0
votes
0answers
24 views

Add @2x to all images by default

I disabled the default srcset attribute WP is adding to all images because it's bloating my code too much and I don't need it really. However, I do upload the retina version each time I upload an ...
1
vote
0answers
8 views

Add select input with pre defined classes to insert image screen?

I'm looking for a way to add a select element (or some multiselect variant) with pre-defined classes to the image insertion screen in Wordpress. I've been looking around for some way to do this but ...
0
votes
1answer
7 views

Decide how Hero image appears on mobile

I generally can google my way to an answer but I can't for the life of me figure out what this is actually called. I apologize in advance. I have a hero image that looks great on a full-size screen. ...
0
votes
1answer
9 views

Can i use my Old Post image URL in my new post?

Can I use an uploaded image from an old post in my new post by using image URL with new Alt description? Is there any effect to the old post when I give a new alt desc in a new post?
1
vote
0answers
29 views

Help With Custom Image and Text Widget

I recently got into making a custom WordPress theme and I've learned a lot along the way, but I've hit a roadblock with making a custom widget.This is the basic output HTML I'd like my widget to ...
0
votes
1answer
23 views

How to accept images at multiple sizes and aspect ratios and display as standardized image size / ratio?

Lets say I accept guest post submissions. On the post archive page I have the image the user uploaded with the post on the left and an excerpt of the post on the right. Unless I programmatically ...
0
votes
1answer
26 views

Is there a way to change all already uploaded images which are PNG and convert them to JPG?

I want to change all images that are already located on server from PNG to JPG. Now I know it could be maybe done the way to download all images convert to JPG and then to rewerite database to change ...
0
votes
1answer
22 views

Change Responsive Images Maximum Width of 1600px

Sorry for my English first. Just started with responsive Images and read https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/ So according to this post, there is a maximum ...