10 examples of 'name js photo' in JavaScript

Every line of 'name js photo' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
102function getPhotoInfo(photoId, callback) {
103 var url = getApiUrl('method=' + METHOD_GETINFO + '&photo_id=' + photoId);
104
105 COG.jsonp(url, function(data) {
106 processPhotoInfo(data);
107
108 if (callback) {
109 callback(data);
110 } // if
111 }, 'jsoncallback');
112} // getPhotoInfo
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

861function format_photo(att, id) {
862 var str_contents, att_link, att_preview, att_title;
863 str_contents = "";
864 if (att.objectType == "photo") {
865 att_link = "";
866 att_preview = "";
867 att_title = "";
868 if (att.url) {
869 att_link = att.url;
870 }
871 if (att.image) {
872 att_preview = att.image.url;
873 }
874 if (att.displayName) {
875 att_title = att.displayName;
876 }
877 if (att_link == "") {
878 if (att.fullImage) {
879 att_link = att.fullImage.url;
880 }
881 }
882 if (att_link.search("plus.google.com/photos") >= 0) {
883 if (att_title == "" && att_preview == "") {
884 att_title = att_link;
885 }
886 if (att_preview != "") {
887 str_contents += " <a href=\"" + att_link + "\" class=\"photo_" + id + "\">";
888 str_contents += "<img src=\"" + att_preview + "\" alt=\"" + ((att_title != "") ? att_title : "preview") + "\">";
889 str_contents += "</a>";
890 }
891 }
892 }
893 return str_contents;
894}
24function getPhotoThumbURL(photoObject) {
25 if(!photoObject)
26 return null;
27 return photoObject.url_sq;
28}
49function setPhoto(photo, image) {
50 return $(photo).empty().append(image);
51}
14function getPhotoUrl(data) {
15 return FLICK_PHOTO_URL_TEMPLATE
16 .replace('{farm-id}', data.farm)
17 .replace('{server-id}', data.server)
18 .replace('{id}', data.id)
19 .replace('{secret}', data.secret)
20 .replace('{size}', 'm');
21}
5function createPhotoElement(imageUrl, postUrl) {
6 return (
7 <div class="AdaptiveMedia">
8 <a href={`${postUrl}`} target="_blank" rel="noopener">
9 <img class="refined-twitter_instagram-inline" src={`${imageUrl}`} />
10 </a>
11 </div>
12 );
13}
103equals(photo) {
104 return this.id === photo.id;
105}
35export function updateUserPhoto(
36 username: string,
37 image: Blob,
38 name: string
39): Dispatcher<string | void> {
40 return (dispatch: Dispatch) => {
41 dispatch(requestPatchUserPhoto(username))
42 return updateProfileImage(username, image, name).then(
43 () => {
44 dispatch(receivePatchUserPhotoSuccess())
45 },
46 error => {
47 dispatch(receivePatchUserPhotoFailure(error))
48 }
49 )
50 }
51}
71valueOf() {
72 return this.original.toString();
73}
28function photo(filePath, callback) {
29 fs.readFile(filePath, function(err, contents) {
30 if (err) return callback(new Error('Failed to read file ' + filePath));
31 try {
32 var result = exif.create(contents).parse();
33 } catch (ex) {
34 return callback(new Error('Failed to read EXIF from ' + filePath));
35 }
36 callback(null, {
37 date: result.tags.DateTimeOriginal ? (result.tags.DateTimeOriginal * 1000) : null,
38 orientation: result.tags.Orientation || null,
39 caption: result.tags.ImageDescription
40 });
41 });
42}

Related snippets