Issue uploading images

Are your WordPress URL and Site Address URL the same? I had a similar issue whereby one had a backslash and the other didn’t which caused it. Also, could you try inspecting the element in Chrome or Firefox and seeing where the URL points? Can you get to this URL directly from the browser?

Small image resizing for big! Alternative to timthumb

If you’re always blowing up a small image to a larger size, and don’t care about the resulting loss in quality (although personally I would, for photos at least) then you might as well simply override the height and width in CSS (or inline HTML) – there’s no gain in making the image file on … Read more

Different image margins on different pages CSS [closed]

You would need to recode your CSS a little. Since you have your beer image in its own container that helps. But you’d want to adjust the CSS: .beer-description{ float: left; width: 70%; } You can tweak it as needed. To not worry about the image size, you should have a width set (can be … Read more

Display images in template file

if You wish to display an image, which is a thumbnail of a post, then use: <?php echo get_the_post_thumbnail( $pageID, ‘thumbnail’ ); ?> if You wish to display an image from media, then use <?php echo wp_get_attachment_image( $attachmentID, ‘thumbnail’ ); ?> thumbnail is set for size and is set by default. Size can be changed … Read more

SVG files and wordpress

You’re going to have to edit your functions.php file and add a few lines. This article has a better explanation. I suggest you try here if you haven’t already. https://css-tricks.com/snippets/wordpress/allow-svg-through-wordpress-media-uploader/

If file exists with page slug name show image else nothing

EDITED ANSWER – First get the full file path to your image and store it to a variable $filename. Use file_exists to check if image exists, and output the image and with it the title of your image. If the condition fails, there is no output. https://codex.wordpress.org/Function_Reference/wp_upload_dir <?php global $post; $slug = get_post( $post )->post_name; … Read more

Display images from JS?

You don’t specify how precisely your JS is output. If you are doing this inline from PHP you could just echo required data in place. If it’s just some arbitrary script, loaded as such, then the common practice in WP is to use wp_localize_script() to pass data from PHP runtime to an enqueued script. While … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)