Skip to main content

Variables

For each "item" in a gallery (i.e. an artwork submission, with one video or image as the thumbnail), there are a bunch of variables used to decide how to render the item.

Example row sent to ArtworkGallery.js
{
    "artwork_category_settings": "1:N,10:N,11:N,12:N,13:N,14:N,15:N,2:N,3:N,4:N,5:N,6:N,7:N,8:N,9:N",
    "artwork_tags": null,
    "artwork_likes_count": 0,
    "artwork_reblogs_count": 0,
    "id": 84,
    "external_id": "lightning-1769506952570940",
    "artist_id": 6,
    "aspect_ratio": 0.72233333333333,
    "title": "lightning",
    "artwork_description": "",
    "date_submitted": "2023-06-23 15:15:33.389246",
    "mature_content": "N",
    "username": "antsstyle",
    "profile_picture_url": "userimages/profilepictures/6/bfu83vND400x400-65a249bd7b551.image/jpg",
    "display_name": "Ant",
    "resized_480p_file_url": "userimages/artworks/6/640x480/LightningantHD-6495b707ef68a.jpg",
    "resized_search_cropped_480p_file_url": null,
    "artwork_file_type": "image/jpeg"
}
{
    "id": "Fang-1769507026427026",
    "aspectRatio": 0.69387755102041,
    "url": "userimages/artworks/6/640x480/fang-6495b75550680.jpg",
    "targetWidth": 175.73,
    "title": "Oerba Yun Fang",
    "nsfw": "N",
    "revealed": "false",
    "initialised": "false",
    "opacity": 0,
    "profilePictureURL": "https://cdn1-test.desertedchateau.com/userimages/profilepictures/6/bfu83vND400x400-65a249bd7b551.image/jpg",
    "username": "antsstyle",
    "displayName": "Ant",
    "categories": {},
    "fileType": "image/jpeg",
    "description": "",
    "artistID": 6,
    "exceededPlaceholderFilters": [],
    "highestCat": "S",
    "isRemembered": false
}

Variable Definitions
Variable name Values / type Purpose / Notes



id String External artwork ID
aspectRatio Double Aspect ratio of thumbnail (width/height)
url String S3 key to 480p file (not the full URL)
targetWidth Double Calculated for the standard gallery layout, see notes
title String Artwork title
nsfw Y or N If artwork contains any NSFW content
revealed "true" or "false" (String) If the artwork has been revealed (applicable only to some NSFW artworks)
initialised "true" or "false" (String) If the artwork object has been appended to the DOM yet
opacity Double (0-1) Opacity to show the artwork at
profilePictureURL String Full URL to the artist's profile picture
username String Artist's username
displayName String Artist's display name
categories Object Any NSFW categories for which the artwork has a setting other than N
fileType String (mime type) The mime type of the artwork (the first file in the artwork submission)
description String The description for the artwork, if any
artistID Integer Artist's user ID
exceededPlaceholderFilters Array Whether the artwork matched any filters for the viewing user that would cause it to be placeholdered, see notes
highestCat 'S', 'B', 'P' or 'H' Highest viewing category for this artwork for the viewing user, see notes
isRemembered true or false (Boolean) Whether the user has already chosen to reveal this artwork before