Questions tagged [assets]

Files managed by Craft, stored in physical folders or (with Craft Pro) on Amazon S3, Rackspace Cloud, and Google Cloud.

Filter by
Sorted by
Tagged with
1
vote
1answer
12 views

How is conflicting asset filename created

I upload files on the frontend using AJAX requests to actionUpload controller. When file is uploaded, I immediately display it using filename returned by controller. In case if filename conflict, ...
0
votes
0answers
19 views

Non-destructive image cropping plug-in

I am looking for a user-friendly, non-destructive way define an image crop when editing an entry with an asset field. Should be able to visually define an image crop Should be able to change the crop ...
2
votes
1answer
26 views

Uploading Assets - PNG changed from 72 dpi to 96

I've seen a couple strange things that Craft does when uploading images (like upsizing jpgs). The most recent, every time I upload a .png file it changes it's DPI from 72 to 96 for some unknown reason ...
0
votes
0answers
10 views

Assets Directory Usability When Editing An Image

I would like the CRAFT CMS to return to the current directory after I edit an image. Let's say I'm viewing a list of images in "assets > images > misc" I edit an image from that directory and then "...
1
vote
1answer
14 views

Outputting image assets with flickity

I'm trying to use flickity to create a draggable gallery on a single entry template, but I'm having issues with the output. In the backend it looks like this. A field using multiple assets. Without ...
0
votes
0answers
14 views

Is it possible to add a volume sub-folder that references an existing sub-folder?

The current physical structure of my assets folders consists of a base folder (uploads), and four sub-folders (banners, images, documents, speakers). Four volumes have been created in Craft, one for ...
0
votes
1answer
24 views

Calls to /actions return 400 Bad Request

I'm trying to use jquery ( and/or VueJS with axios) to delete an asset from a frontend form (user is logged in and they have permissions to delete assets from this volume) I have an HTML element that ...
1
vote
1answer
12 views

How to work getFieldValue for assets

I have been implementing my own PHP plugin code. In that, I need to get an asset field in user info. If I can get if the asset is set on the field or not, it is enough. I can get the values of text ...
1
vote
1answer
18 views

Image Upload & Editing Suddenly not Working

I'm getting an error on Image Upload and Asset Editing on an existing site. I'm getting the Upload failed. The error message was: “The file “.../storage/runtime/temp/...” does not appear to be an ...
0
votes
0answers
19 views

Assets out of web folder cannot be seen by non-admin user

I would like to put some assets out of web folder because of security reason. There is internal folder just under project root. The assets are surely put in correct folder. And, the assets are set on ...
0
votes
0answers
12 views

Asset URLs for transformed images broken after Craft 2 -> Craft 3 upgrade?

After a Craft 2 to Craft 3 upgrade a few months ago, I'm going back and cleaning up a few lower-priority issues left over from that. This is one of those. A number of entries have embedded image ...
0
votes
1answer
27 views

Import a large number of assets via feedme

I have 224,559 assets (images) I need to import and assign to entries. Assets are currently stored in folders that match their original asset id. Imported assets will be stored on s3. I'm using feedme ...
1
vote
1answer
11 views

Dynamic Asset Sub Folder Paths based on section and. if/else or turnery operators

How can I create dynamic paths for asset uploads? Basically I want my structure to be like so; company-name-slug company logo-1.jpg image-2.jpg products product-image-1.jpg services ...
0
votes
0answers
32 views

How to Upload Multiple Assets Using Frontend Form

I'm trying to create a more interactive experience to upload moultiple images on a frontend entry form. Things I have done: I have implemented the code here: https://docs.craftcms.com/v3/dev/...
2
votes
1answer
31 views

{basePath} creates a folder named {basePath} issue

just built a blog with craft, and I got some issues with assets pathing. In the general.php I put return array( 'environmentVariables' => array( 'basePath' => '/images', ...
0
votes
0answers
27 views

Setting up assets path for live website

I just want to make sure I will do the assets pathing right, if someone could check. I have https://mysite.com and https://mysite.com/uploads as the folder where the assets should go. After I set my ...
0
votes
0answers
33 views

404 Error for assets where “Base URL” and “File system path” are different

I am new to Craft 3 and I have seen similar questions asked many but never answered. I want to store my images in a directory that is not public, yet I want them to be served correctly by Craft. The ...
1
vote
1answer
16 views

Sync existing local images Amazon S3

I installed "Amazon S3" in a website. Is there anyway so that I can sync existing local images to Amazon S3?
1
vote
1answer
40 views

Additional criteria to filter status of field passed into RelatedTo

I'm trying to save all the images related to an entry in a variable. I need the images that are added through a matrix field in the entry. I'm using the following code, but am then also getting images ...
0
votes
0answers
13 views

Updated S3 library for Craft CMS 2

I've got a site stuck on an older version of Craft, v2. I'd like to switch to using S3 to store all my assets but I've ran into a problem. I cannot authenticate using the S3 api library, this is one ...
1
vote
1answer
50 views

Forcing creation of all transformations for all assets

Regarding a similar question I only found the advice to delete a table in the database but because I don't like fiddling with the db very much I like to ask: Are there ways to force craft to generate ...
0
votes
0answers
16 views

Specify an asset volume for a file input on a front-end entry form

Is this possible? I want to specify the volume and/or folderId via hidden input, not just use the default. Nothing documented here: https://docs.craftcms.com/v3/assets-fields.html#uploading-files-...
1
vote
1answer
19 views

How to reference a folder inside of a volume, Craft 3

How do I reference a specific folder (by name) inside of a specific volume. I cannot use the folder ID, I must use the folder name because the name of the folder is a variable related to specific ...
1
vote
1answer
31 views

alternative global variable to siteUrl or the primary website?

I am currently developing a multilingual craft website. To include assets like styles and scripts, I have so far built the URL following the pattern "{{ siteUrl }}/assets/css/main.css". However, as ...
0
votes
0answers
13 views

entry / asset url integrity check

Is there any mechanism in Craft (or a plugin) which protects entries or assets from being deleted, if they are used in an asset / entry field used in an entrytype, global, ...? Or is there a way to ...
0
votes
0answers
21 views

Best multi-environment approach using AWS S3

I need some direction on how best to run multi-environments with Craft assets and static asset builds (JS, CSS, etc) going to S3. I have three environments: dev, staging, and production. Each have ...
1
vote
1answer
54 views

how to check for the 2nd, 3rd, 4th… image in an asset's field

I am currently "translating" our current website, which runs on the lastest expressionengine, to craft. we use imagegrids that are arranged by css. so in an entrie's pulldown field choose between ...
1
vote
1answer
58 views

GraphQL two image transforms for same field

To get image transform in GraphQL we use this image { url @transform ([width: 300, immediately: true]) } But how do I get two different image transforms (for responsive image) for this asset ...
0
votes
0answers
9 views

Craft 3, Freeform entry not created but file gets uploaded

I have a freeform form that submits an entry. If I submit without choosing a file to upload, the entry gets created fine. If I submit the form with a file chosen, the file gets uploaded to the proper ...
0
votes
0answers
25 views

Find unused asset volumes

Is is possible to get a list of asset volumes that aren't being used by any fields? I often reuse a base Craft install when starting a new project and being able to quickly cleanup volumes that are no ...
0
votes
0answers
19 views

Localized slug in dynamic asset path

I'm trying to save images in a folder name based on their English slug (or title), to avoid having duplicate folders with titles in different languages. In Craft 2 I did {{object.locale('en').title|...
1
vote
1answer
51 views

How to reference specific asset subfolders in Craft 3

I am having trouble referencing specific subfolders in Assets in Craft 3 using Twig. The query that I've written is still showing all content, when I only want it to show content from a specific ...
1
vote
1answer
20 views

Amazon S3 plugin uploading to different directory

I was using Amazon S3 with Craft 2 fine, now after updating and installing the plugin I am having issues. We use a folder inside our bucket as the root Assets location - e.g. /bucket-name//folder ...
0
votes
0answers
21 views

img not found in browser (error 404)

I really have a problem here and I don't know how to fix it. On my homepage, the img is displayed perfectly fine. I used the following code: <div class="headerbild"> {% for block in ...
2
votes
1answer
144 views

How do I dynamically define Asset Volumes' Base URLs for different Sites?

There must be a simple answer for this but despite fumbling around with it for quite a while and searching the web for answers I am stymied. Perhaps I'm approaching it in the wrong way. I'm feeling ...
1
vote
1answer
19 views

Image thumbnail generation (on S3/Cloudfront integration) returns blank when first generated

For a client site with S3/Cloudfront integration, we are seeing that images will not be able to load for the first time if they have not been generated before. I'm guessing this is because it takes ...
2
votes
1answer
36 views

How to get image url from matrix field

I have an image in a matrix-field, but can't get the url from it. dump(block.image.one().url) says NULL. My code is: {% if entry.hero %} {% for block in entry.hero %} {% if block.type == 'hero'...
1
vote
1answer
44 views

How do you output the Image Caption on an asset?

When you double-click an asset you can set the Image Caption: How do you structure the query to output this Image Caption "field?"
0
votes
0answers
94 views

Internal Server Error - The file does not appear to be an image

On a live environment I'm hitting an error when uploading some jpg images, which wasn't a problem on dev or production. I can get around it by re-exporting the image out and keeping it under 1mb, but ...
0
votes
0answers
28 views

Best practice for organizing assets, locally and in S3?

Asset organization "best practice" question: for a new site, I had planned to reuse as many fields as possible between sections. Now I see that means that I'm not able to separate uploads from ...
1
vote
3answers
54 views

How can I restore Matrix content after accidentally changing its field type?

We accidentally deleted all our body text on all our pages, how do I redo my website to a older version. (24 hours ago) We changed matrix to assets and after that every body text disappeared.
1
vote
1answer
24 views

How to toggle main product image from multiple images

I'm having some trouble figuring out how to properly update the main product image from a set of images that are available. Within the product detail page, I have a large default image that is shown ...
1
vote
1answer
18 views

Craft Pro 3.1.33 - Download PDF in admin user profile

In Craft 3 Pro i need to download a PDF file that a template form submits to active user profile. The PDF submits from the front and goes to the admin area under the user account profile. The ...
1
vote
0answers
43 views

Craft 3 Image Editor / Redactor - Remove?

TL;DR Can the button for "Image Editor" be removed from Redactor in Craft 3? I've looked around the Craft docs and web, but I can't find a way to remove the button that appears within the Redactor ...
0
votes
0answers
41 views

Asset Focal Point from Front End

It is possible to set the focal point via the CP, but I am trying to allow non-CP users to edit their images. I have so far been unable to provide a focalPoint parameter while adding an image. Is this ...
1
vote
1answer
58 views

Use Service Worker in Plugin

I am currently working on a plugin that uses a service worker which gets registered on the front-end by some javascript code and the problem is that the service worker scope is restricted to /...
1
vote
1answer
38 views

AWS Serialisation error on front end

Getting the following error on a site I'm developing: Instances of craft\awss3\S3Client cannot be serialized Unsure if this is an issue with the Amazon S3 plugin or at my bucket's end. Any ideas ...
3
votes
1answer
676 views

Error on upload: “Impossible to create the root directory…”

In Craft 3.2.10, I'm getting this error message when I try to upload an image asset: Upload failed. The error message was: “Impossible to create the root directory "/Users/me/Work/Client/repo/web/...
3
votes
1answer
73 views

What is “Temp Uploads Location” in Craft 3.2.10

In Craft (Solo) 3.2.10, In Settings > Assets > Asset Settings, there's a field called "Temp Uploads Location". I do see images in mine that I intended to go into the system, but not into there. What ...
1
vote
1answer
107 views

How do I set up Craft 3 to web server in WAMP?

I'm very new to Craft CMS, and I certainly love this concept! However, I keep trying to run it locally onto my computer following the documentation here https://docs.craftcms.com/v3/installation.html ...

1
2 3 4 5
16