wordpress-settings-api-class icon indicating copy to clipboard operation
wordpress-settings-api-class copied to clipboard

Image field

Open tareq1988 opened this issue 9 years ago • 8 comments

Now we have a file upload field and it contains a input field with the URL of the selected file. It would be better to have a image field with a image thumbnail preview.

tareq1988 avatar May 19 '15 13:05 tareq1988

I already have this by adding description to add the preview and small js. I'm not sure it's good to force this in the class it self. maybe with an option. Maybe first we should split types file and media? or at least rename this to media type?

roidayan avatar May 19 '15 13:05 roidayan

maybe to rename this callback type to image ? it isn't really for files but for images..

roidayan avatar May 19 '15 13:05 roidayan

see my suggestion here https://github.com/tareq1988/wordpress-settings-api-class/pull/45

roidayan avatar May 19 '15 14:05 roidayan

I think you misunderstood me. The file type will be there as it is. But I am talking about creating an image only type. So we will have both file and image type fields. Sorry if I was not clear enough.

tareq1988 avatar May 19 '15 17:05 tareq1988

so the image type will be the same as file but with preview?

I thought the file will be input type="file"

roidayan avatar May 19 '15 19:05 roidayan

Yeah, the image type will be the same is file. Except the input box with URL and will show the image preview.

tareq1988 avatar May 19 '15 20:05 tareq1988

related pr #47

roidayan avatar May 21 '15 15:05 roidayan

Hey, @tareq1988. Any chance to add this field?

nk-o avatar Sep 09 '17 08:09 nk-o