Gmail image proxy - php

I'm sending out html emails. One of the png images is not showing up. When I click on the proxy link I get a 404 error, but the actual image exists and can be publicly clicked on. This works fine on my dev server too. Any ideas as to what could be causing this?

I've heard reports that having the same image in multiple places can be the cause of this error with the Google proxy. Save your image as a different names and it should show. Silly that you'd want to load 2 images instead of one, but I believe that is the only workaround currently.

Related

How to correctly embed image in html email

I have some trouble to correctly embed images in html/php email.
My .php file just sends out a few text emails. But I want a picture in there.
<img src="http://website/image.jpg"> works so far but outlook blocks the image and I have to click download images every time.
So I found out that this is the behaviour of linked images. What I need is an embeded image.
<img src="image.jpg"> seems easy but does not work. The image is in the root directory of the index.php but the Mail does not contain the image. Just an error appears: "image cant be displayed".
I swear I googled for 2 hours now. How do the companies do that with their signature.
I appreciate your help.
I've done the company signature couple days ago and found a lot of problems.
For instance, you can set background-image and gmail and most of the email managers will display it, but outlook will not.
For images isn't the same.
Outlook will display your image, usually when it's https://...
In my case I was using firebase hosting to locate the images and 0 problems with that.
<img data-imagetype="External" src="https://firebasestorage.googleapis.com/..." class="x_gmail-CToWUd">
I use this signature in gmail, and outlook is displaying that <img> tag without any problems, and no need to make any attachment.
The data-imagetype is added from outlook when receiving the email and the class x_gmail... too.
Hope this will help you, if not I'll try to find a better solution for you.
Most email clients block images as a default. It’s up to the user or administrator to overcome this behavior. You can’t override it in email.

Wicked PDF not rendering remote image from php source

I have a php site that serves image content based on query parameters. I'm trying to embed that image into a wicked_pdf and am just getting a little box with the alt name. I've done the troubleshooting by showing in html and the image renders properly with the tag
<img alt="Doorsjpg" src="http://config2/doorsjpg.php?lineup=BR111">
I've tried it with both image_tag and wicked_pdg_image_tag and the results are the same either way.
This wound up being a DNS issue, apparently. Changing "config2" in the url to the IP address resolved it. Couldn't tell you why it worked in HTML mode if it was DNS but it's been that kind of programming day already and I no longer question these things.

Show cross-domain image via php

I have a script that displays the images via php. www.maindomain.com/image.php?img=test.jpg serve images, and i have other sites, where these images are displayed like this
<img src="www.maindomain.com/image.php?img=test1.jpg">
But this script, for show image is on my www.firstsite.com and www.secondsite.com. Is posibble to log which site is showing image? (put it to database for example).
I know, i can use $_SERVER['HTTP_REFERER'] but it's not 100%. Any other ideas?
The only 100% failsafe way to do it is to share the same image with different URLs. F.i. www.maindomain.com/image.php?test1.jpg&ref=first and www.maindomain.com/image.php?test1.jpg&ref=second. As actually this images are not requested by first or second servers but by visitor's browsers. Having different GET params in URL makes it easy to log data you need.

Masking or hiding the path to a background image

I'm displaying pieces of an image in a large grid created from divs. I'm using the background-image and background-position to display portions of the image. The problem I'm running in to is that a user can simply open up firebug and see the entire image (which defeats the purpose of the game).
I've attempted to mask the path using a php script as the URL but if the user navigates to the php file, they can still see the image. It would appear that anything I do with the CSS is entirely client side so denying everything outside the localhost in my .htaccess won't work.
Any suggestions?
The over arching goal is to have an automated way to split and display pieces of the image into a grid.
If you deliver the whole image to the browser, the browser holds the image and has every right to show it to a user. I don't think you can prevent the browser from showing it. I'm afraid you will have to deliver the image in pieces, or perhaps write your whole game using <canvas> and play around with images as pixel data. :)

Get website image from google via php

I'm working on a website for a specific client. And he wants to be able to add link to the website, and on mouse hover to have a image of that website appear.
Now, he doesen't want to take an image of the website, he only wants to input the link and have the website do everything else.
So my question is ->
Is there a way (eg. google API) to get a website image only by providing the url via php?
Sort of like in google, when you hover over a lik of a page, a tooltip pops up to the right with an image.
Any help is, as always, appriciated :)
Here is a list of 10 free thumbnail services
http://www.webresourcesdepot.com/10-free-website-thumbnail-generation-services/
You can simply refer to the URLs of these services, e.g.
<img src="http://SnapCasa.com/Get.aspx?code=[code]&size=[size]&url=[url]" />
or make a CURL call from one of your PHP scripts and temporarily store/permanently save the image that was generated.
Have recently developed Thumbnailspro.com. It is currently free to use while in beta testing as we work out the bugs, but so far its getting quite popular, you can request thumbnails directly from your website using the code below :
http://thumbnailspro.com/thumb/http://msn.com&s=150
s=Size, size can be anywhere from 10 to 1000 pixels just add s=300 to display a thumbnail 300 pixels in width. We are trying to add more options as we go for thumbnail requests and at the same time trying to keep it as simple as possible so you don't have to enter something like the code below to get your thumbnails :
http://somethumbnailsite.com/viewurl.php?url=http://msn.com&x=200&y=300&bwidth=1024&bheight=768&rotate=76&what_the_hell%20_is_all_this_crap!
So is much more effecient!
Like the service or have any bugs contact us at admin#thumbnailspro.com!
No. The only way to do this is to request the HTML for the page, render the page and then create a thumbnail from that page render. Google does this because in the process of spidering the web, they already get all that data, and they've got a nice optimized rendering engine (Chrome) that they can put the data through, and then they've got tons of online storage space to store the cached image. There's a lot of work there, though.

Categories