html – Must the image url in a sitemap file begin with the same domain the file is stored on?

I remember when making a sitemap, all URLs defined in between <loc> and </loc> must be part of the same domain as the domain the file is stored on. For example, I can use this line in my sitemap…

…Only if the sitemap is stored on and publicly accessible from the folder mapped to the domain.

But that entry above won’t work if the sitemap is stored on a folder representing a different domain such as or even

My question is, should I use the above thinking when trying to index for Google images? For example, do image URLs defined in <image:loc> and </image:loc> have to contain the same domain as the location of the sitemap file the entries are contained in?

The reason why I ask is because I have two subdomains. Let’s call them and T is for text, and I is for images.

My site map for one page currently would look like something as follows:

<image:title>Some image</image:title>

Am I wrong with using a different subdomain to reference the image? Assume the sitemap file is stored and accessed at

php – Add Featured Image to Existing Post

I have already created thousands of product as posts (CSV Import). They have a custom post type. Now, I would like to assign featured image to each existing post programmatically (without manually entering each post and setting the featured images more than 3,000 times).

Additional info:

  • Import plugin have not worked out, so I cannot attach the images using CSV import.
  • I use a custom field called ‘ean’ with each prduct, and it is standing as the unique serial number. It is an interger, for example: “5999626322456”. The same interger is standing for name of the image (i.e. 5999626322456.jpg).

What code do you recommend to use? I tried these two (among many), but they do not work. What do I do wrong?

function set_post_thumbnail( $post, $thumbnail_id ) {
    $post    = get_post( $post );
    $ean_url = rwmb_get_value( 'ean' );
    $kep_url = $ean_url . '.jpg';
    $thumbnail_id = attachment_url_to_postid( $kep_url );
    if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) {
        if ( wp_get_attachment_image( $thumbnail_id, 'thumbnail' ) ) {
            return update_post_meta( $post->ID, '_thumbnail_id', $thumbnail_id );
        } else {
            return delete_post_meta( $post->ID, '_thumbnail_id' );
    return false;

// Add Featured Image to Post

$ean_url          = rwmb_get_value( 'ean' );
$image_url        = '/wp-content/uploads/' . $ean_url . '.jpg'; // Define the image URL here
$image_name       = $ean_url . '.jpg';
$upload_dir       = wp_upload_dir(); // Set upload folder
$image_data       = file_get_contents($image_url); // Get image data
$unique_file_name = wp_unique_filename( $upload_dir('path'), $image_name ); // Generate unique name
$filename         = basename( $unique_file_name ); // Create image file name

// Check folder permission and define file location
if( wp_mkdir_p( $upload_dir('path') ) ) {
    $file = $upload_dir('path') . '/' . $filename;
} else {
    $file = $upload_dir('basedir') . '/' . $filename;

// Create the image  file on the server
file_put_contents( $file, $image_data );

// Check image file type
$wp_filetype = wp_check_filetype( $filename, null );

// Set attachment data
$attachment = array(
    'post_mime_type' => $wp_filetype('type'),
    'post_title'     => sanitize_file_name( $filename ),
    'post_content'   => '',
    'post_status'    => 'inherit'

// Create the attachment
$attach_id = wp_insert_attachment( $attachment, $file, $post_id );

// Include image.php
require_once(ABSPATH . 'wp-admin/includes/image.php');

// Define attachment metadata
$attach_data = wp_generate_attachment_metadata( $attach_id, $file );

// Assign metadata to attachment
wp_update_attachment_metadata( $attach_id, $attach_data );

// And finally assign featured image to post
set_post_thumbnail( $post_id, $attach_id );

hi guys, why do I get this error when trying to load an image into a java database?

This is the code:

        boolean estado = false;

            ArrayList<String> lista = new ArrayList<>();
            try {
                FileItemFactory file = new DiskFileItemFactory();
                ServletFileUpload fileUpload = new ServletFileUpload(file);
                List items = fileUpload.parseRequest((RequestContext) request);
                for (int i = 0; i < items.size(); i++) {
                    FileItem fileItems = (FileItem) items.get(i);

                    if (!fileItems.isFormField()) {
                        File f = new File("C:\images\" + fileItems.getName());
                    } else {

                estado = daoFotos.insertarFoto(dtoFotos);

            } catch (Exception e) {
                request.setAttribute("message", e);


and I got this error:

java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade cannot be cast to org.apache.tomcat.util.http.fileupload.RequestContext

how can I solve this?

Image Permissions Plugin

I’m kicking around the idea of using wordpress for a future project but it’s going to need so many plugins I’m having doubts.

#1 requirement is that images are tied to a user/contributor and to a custom post. Anyone editing the custom post can see any images that have been uploaded. A user can see all their images regardless of which custom post they’re editing.

Does anyone know if a plugin that handles these file permissions?


magento2 – How to add the customised product image and URL to cart using GraphQL?

Magento Lovers,

I’m working with bundle product and the product is having different options as simple products. The requirement which I’m having is that when we customise the product and add it to the cart, the cart page should show the customised product image and its url so that if customer clicks on product from the cart page they will be redirected to the customised product page and not a main product page. I have to do this using graphql. Since I’m new to GraphQL, could anyone please help me on this and give me some idea to start with this?

Thanks in advance

Google Sheets – Turning text in cell into an image

I was wondering if it’s possible to turn text into a picture. For example the text "Arizona Cardinals" is imported automatically into a google sheet and that cell recognizes "Arizona Cardinals" and turns it into an image (×300.png)

I know there is a script editor in google sheets but I don’t exactly know how to start this type of "if-then" or if it’s even possible. Any help would be appreciated and thanks in advance!

Woocommerce Admin Filter products by image

Woocommerce Admin Filter products by image – WordPress Development Stack Exchange

How to image memory on FreeBSD for Volatility

How do I image memory on FreeBSD so I can analyze it using memory forensics tools like Volatility ? Are you restricted from dd /dev/mem ?

css – Position text inside ahref element (in center of image)

I created a static block with the following issue:

I’m trying to center text inside an ahref element, which looks like the following;

    <div class="small-24 medium-16 cell">
    <a title="Chairs" href="/chairs"><img src="{{media url="wysiwyg/chair-1.png"}}" alt="Chairs" width="830" height="325">Chairs</a>

Normally, I would position it as follows, with the text in a span in the ahref element next to the img:

a {
   position: relative;
span {
position: absolute;
bottom: 10px;
left: 10px;

However, I’m not allowed to save the span tag inside the ahref element next to the image. See image underneath.
enter image description here

How can I position the text inside the ahref element over the image?

How to mount image file without root?

In rooted android phone, ext4 image file is mounted using these commands in android terminal :

  #  mknod    /dev/block/loop52  b 7 0 
  #  losetup  /dev/block/loop52  /sdcard/ext1.img
  #  mkdir /mnt/ext
  #  mount -t ext4 -o rw,noatime  /dev/block/loop52  /mnt/ext

I have an ext4 image file stored in sdcard.
How can I mount the ext4 image file in my non rooted android phone or Is there any other way to access it ?

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheap USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies New Proxy Lists Every Day Best Quality USA Private Proxies